From: Maxime Ripard <mripard@redhat.com>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
op-tee@lists.trustedfirmware.org,
linux-arm-kernel@lists.infradead.org,
"Olivier Masse" <olivier.masse@nxp.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Yong Wu" <yong.wu@mediatek.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
"Brian Starkey" <Brian.Starkey@arm.com>,
"John Stultz" <jstultz@google.com>,
"T . J . Mercier" <tjmercier@google.com>,
"Christian König" <christian.koenig@amd.com>,
"Sumit Garg" <sumit.garg@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
azarrabi@qti.qualcomm.com,
"Simona Vetter" <simona.vetter@ffwll.ch>,
"Daniel Stone" <daniel@fooishbar.org>,
"Rouven Czerwinski" <rouven.czerwinski@linaro.org>,
robin.murphy@arm.com, "Sumit Garg" <sumit.garg@oss.qualcomm.com>
Subject: Re: [PATCH v12 3/9] tee: implement protected DMA-heap
Date: Fri, 3 Oct 2025 16:12:07 +0200 [thread overview]
Message-ID: <20251003-majestic-indigo-emu-d9dbdd@houat> (raw)
In-Reply-To: <CAHUa44H3nGgY9q68YRRp5A7Q6Ku3P_URuv+L7H8chYzLAKd8mQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2259 bytes --]
On Thu, Oct 02, 2025 at 02:57:25PM +0200, Jens Wiklander wrote:
> Hi,
>
> On Thu, Oct 2, 2025 at 9:54 AM Maxime Ripard <mripard@redhat.com> wrote:
> >
> > On Thu, Sep 11, 2025 at 03:49:44PM +0200, Jens Wiklander wrote:
> > > +static const char *heap_id_2_name(enum tee_dma_heap_id id)
> > > +{
> > > + switch (id) {
> > > + case TEE_DMA_HEAP_SECURE_VIDEO_PLAY:
> > > + return "protected,secure-video";
> > > + case TEE_DMA_HEAP_TRUSTED_UI:
> > > + return "protected,trusted-ui";
> > > + case TEE_DMA_HEAP_SECURE_VIDEO_RECORD:
> > > + return "protected,secure-video-record";
> > > + default:
> > > + return NULL;
> > > + }
> > > +}
> >
> > We've recently agreed on a naming guideline (even though it's not merged yet)
> >
> > https://lore.kernel.org/r/20250728-dma-buf-heap-names-doc-v4-1-f73f71cf0dfd@kernel.org
>
> I wasn't aware of that (or had forgotten it), but during the revisions
> of this patch set, we changed to use "protected".
I think protected is fine and what is documented in that patch, right?
> > Secure and trusted should be defined I guess, because secure and
> > protected at least seem redundant to me.
>
> Depending on the use case, the protected buffer is only accessible to
> a specific set of devices. This is typically configured by the TEE
> firmware based on which heap we're using. To distinguish between the
> different heaps, I've simply added the name of the use case after the
> comma. So the name of the heap for the Trusted-UI use case is
> "protected,trusted-ui".
I guess my point is that, without any prior knowledge of how that heap
works, I have no idea what the "trusted-ui" use case actually is.
> What would a heap called "protected,ui" represent? Protected buffers
> for a UI use case? What kind of UI use case?
I agree with all those questions. They apply equally to trusted-ui and
secure-video though.
If you want to have a vendor-specific name, I guess that's fine. But you
should at the very least document what all these heaps are for and the
subtleties like the set of device that can access those buffers (or how
to figure out that list if it's somewhat dynamic).
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2025-10-03 14:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 13:49 [PATCH v12 0/9] TEE subsystem for protected dma-buf allocations Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 1/9] optee: sync secure world ABI headers Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 2/9] dma-buf: dma-heap: export declared functions Jens Wiklander
2025-10-02 7:47 ` Maxime Ripard
2025-10-02 12:17 ` Jens Wiklander
2025-10-02 12:40 ` Nicolas Dufresne
2025-10-02 19:45 ` John Stultz
2025-10-03 13:23 ` Maxime Ripard
2025-09-11 13:49 ` [PATCH v12 3/9] tee: implement protected DMA-heap Jens Wiklander
2025-10-02 7:54 ` Maxime Ripard
2025-10-02 12:57 ` Jens Wiklander
2025-10-03 14:12 ` Maxime Ripard [this message]
2025-09-11 13:49 ` [PATCH v12 4/9] tee: refactor params_from_user() Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 5/9] tee: new ioctl to a register tee_shm from a dmabuf file descriptor Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 6/9] tee: add tee_shm_alloc_dma_mem() Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 7/9] optee: support protected memory allocation Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 8/9] optee: FF-A: dynamic " Jens Wiklander
2025-09-11 13:49 ` [PATCH v12 9/9] optee: smc abi: " Jens Wiklander
2025-09-12 10:16 ` [PATCH v12 0/9] TEE subsystem for protected dma-buf allocations Jens Wiklander
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=20251003-majestic-indigo-emu-d9dbdd@houat \
--to=mripard@redhat.com \
--cc=Brian.Starkey@arm.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=azarrabi@qti.qualcomm.com \
--cc=benjamin.gaignard@collabora.com \
--cc=christian.koenig@amd.com \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jens.wiklander@linaro.org \
--cc=jstultz@google.com \
--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=matthias.bgg@gmail.com \
--cc=olivier.masse@nxp.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=robin.murphy@arm.com \
--cc=rouven.czerwinski@linaro.org \
--cc=simona.vetter@ffwll.ch \
--cc=sumit.garg@kernel.org \
--cc=sumit.garg@oss.qualcomm.com \
--cc=sumit.semwal@linaro.org \
--cc=thierry.reding@gmail.com \
--cc=tjmercier@google.com \
--cc=yong.wu@mediatek.com \
/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
all inboxes | Powered by JetHome®