Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "Shawn Sung (宋孝謙)" <Shawn.Sung@mediatek.com>,
	"mripard@kernel.org" <mripard@kernel.org>
Cc: "sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v5 2/9] drm/mediatek: Add secure buffer control flow to mtk_drm_gem
Date: Tue, 28 May 2024 07:06:40 +0000	[thread overview]
Message-ID: <5ed64ef3eb237cece6efd3e83477fcde93d38a17.camel@mediatek.com> (raw)
In-Reply-To: <20240415-guppy-of-perpetual-current-3a7974@houat>

Hi Maxime,

[snip]

I'm sorry for losing your previous comment mail.
I finally found a way to import this mail back so I can reply to you.

> > -	mtk_gem = mtk_gem_create(dev, args->size, false);
> > +	if (args->flags & DRM_MTK_GEM_CREATE_ENCRYPTED)
> > +		mtk_gem = mtk_gem_create_from_heap(dev, "mtk_svp_cma",
> > args->size);
> 
> That heap doesn't exist upstream either. Also, I'm wondering if it's
> the
> right solution there.
> 

Yes, I found that its name changed to "restricted_mtk_cma" in the
latest patch: 
https://patchwork.kernel.org/project/linux-mediatek/patch/20240515112308.10171-10-yong.wu@mediatek.com/

> From what I can tell, you want to allow to create encrypted buffers
> from
> the TEE. Why do we need this as a DRM ioctl at all? A heap seems like
> the perfect solution to do so, and then you just have to import it
> into
> DRM.
> 

OK, I'll try to change the userspace's ioctl from
DRM_IOCTL_MTK_GEM_CREATE to DMA_HEAP_IOCTL_ALLOC to get the buffer fd,
then import to DRM.

> I'm also not entirely sure that not having a SG list is enough to
> consider the buffer secure. Wouldn't a buffer allocated without a
> kernel
> mapping also be in that situation?
> 

I have confirmed to Yong.Wu that secure buffer also have sg list, so
the secure checking method "!sg_page(sg->sgl)" will be deprecated.

Regards,
Jason-JH.Lin

> Maxime
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-05-28  7:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 10:26 [PATCH v5 0/9] Add mediate-drm secure flow for SVP Shawn Sung
2024-04-03 10:26 ` [PATCH v5 1/9] drm/mediatek/uapi: Add DRM_MTK_GEM_CREATE_ENCRYPTED flag Shawn Sung
2024-04-15  9:32   ` Maxime Ripard
2024-04-17  8:36     ` Jason-JH Lin (林睿祥)
2024-04-16 14:09   ` Nicolas Dufresne
2024-04-16 17:19     ` Jeffrey Kardatzke
2024-04-17  8:41       ` Jason-JH Lin (林睿祥)
2024-04-03 10:26 ` [PATCH v5 2/9] drm/mediatek: Add secure buffer control flow to mtk_drm_gem Shawn Sung
2024-04-15  9:37   ` Maxime Ripard
2024-05-28  7:06     ` Jason-JH Lin (林睿祥) [this message]
2024-04-03 10:26 ` [PATCH v5 3/9] drm/mediatek: Add secure identify flag and funcution to mtk_drm_plane Shawn Sung
2024-04-03 10:26 ` [PATCH v5 4/9] drm/mediatek: Add mtk_ddp_sec_write to config secure buffer info Shawn Sung
2024-04-03 10:26 ` [PATCH v5 5/9] drm/mediatek: Add get_sec_port interface to mtk_ddp_comp Shawn Sung
2024-04-03 10:26 ` [PATCH v5 6/9] drm/mediatek: Add secure layer config support for ovl Shawn Sung
2024-04-03 10:26 ` [PATCH v5 7/9] drm/mediatek: Add secure layer config support for ovl_adaptor Shawn Sung
2024-04-03 10:27 ` [PATCH v5 8/9] drm/mediatek: Add secure flow support to mediatek-drm Shawn Sung
2024-04-03 10:27 ` [PATCH v5 9/9] drm/mediatek: Add cmdq_insert_backup_cookie before secure pkt finalize Shawn Sung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ed64ef3eb237cece6efd3e83477fcde93d38a17.camel@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Shawn.Sung@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=christian.koenig@amd.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sumit.semwal@linaro.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox