[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251003-majestic-indigo-emu-d9dbdd@houat>
Date: Fri, 3 Oct 2025 16:12:07 +0200
From: Maxime Ripard <mripard@...hat.com>
To: Jens Wiklander <jens.wiklander@...aro.org>
Cc: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org, op-tee@...ts.trustedfirmware.org,
linux-arm-kernel@...ts.infradead.org, Olivier Masse <olivier.masse@....com>,
Thierry Reding <thierry.reding@...il.com>, Yong Wu <yong.wu@...iatek.com>,
Sumit Semwal <sumit.semwal@...aro.org>, Benjamin Gaignard <benjamin.gaignard@...labora.com>,
Brian Starkey <Brian.Starkey@....com>, John Stultz <jstultz@...gle.com>,
"T . J . Mercier" <tjmercier@...gle.com>, Christian König <christian.koenig@....com>,
Sumit Garg <sumit.garg@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, azarrabi@....qualcomm.com,
Simona Vetter <simona.vetter@...ll.ch>, Daniel Stone <daniel@...ishbar.org>,
Rouven Czerwinski <rouven.czerwinski@...aro.org>, robin.murphy@....com, Sumit Garg <sumit.garg@....qualcomm.com>
Subject: Re: [PATCH v12 3/9] tee: implement protected DMA-heap
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@...hat.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
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists