Re: [EXT] Re: [PATCH v2 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2023-02-03 Thread Olivier Masse
updated to support secure dma heap with Kernel version 5.11 and higher. the userland allocation could be find here: https://github.com/OP-TEE/optee_test/blob/3.20.0/host/xtest/sdp_basic.c#L153 This upgrade need a Linux dma-buf patch: https://lore.kernel.org/all/20220805154139.2qkqxwklufjpsfd

Re: [PATCH v2 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2023-01-27 Thread Olivier Masse
to register a list of pages. Our solution use a fixed protected reserved memory region and do not rely on a dynamic protection managed in secure. The scope of this implementation rely on a static memory region handled by a specific DMA Heap type. Best regards, Olivier MASSE On ven., 2022-08-12 at 16:3

Re: [EXT] Re: [PATCH v2 0/1] tee: Add tee_shm_register_fd

2022-09-08 Thread Olivier Masse
Hi Sumit On ven., 2022-08-19 at 13:54 +0530, Sumit Garg wrote: > Caution: EXT Email > > Hi Olivier, > > On Fri, 12 Aug 2022 at 20:01, Olivier Masse > wrote: > > > > Add a new ioctl called TEE_IOC_SHM_REGISTER_FD to register a > > shared memory from a dmabuf

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-17 Thread Olivier Masse
+Cyrille Hi Nicolas, On mer., 2022-08-17 at 10:29 -0400, Nicolas Dufresne wrote: > Caution: EXT Email > > Hi Folks, > > Le mardi 16 août 2022 à 11:20 +, Olivier Masse a écrit : > > Hi Brian, > > > > > > On ven., 2022-08-12 at 17:39 +0100, Bria

Re: [EXT] Re: [PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-16 Thread Olivier Masse
02 août 2022 à 11:58 +0200, Olivier Masse a écrit : > > add Linaro secure heap bindings: linaro,secure-heap > > Just a curiosity, how is this specific to Linaro OPTEE OS ? Shouldn't > it be "de- > linaro-ified" somehow ? > > regards, > Nicolas > >

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-16 Thread Olivier Masse
Hi Brian, On ven., 2022-08-12 at 17:39 +0100, Brian Starkey wrote: > Caution: EXT Email > > Hi, > > On Mon, Aug 08, 2022 at 02:39:53PM +, Olivier Masse wrote: > > Hi Brian, > > > > On ven., 2022-08-05 at 16:41 +0100, Brian Starkey wrote: > > >

Re: [EXT] Re: [PATCH v2 0/1] tee: Add tee_shm_register_fd

2022-08-16 Thread Olivier Masse
Hi Jens, On mar., 2022-08-16 at 10:17 +0200, Jens Wiklander wrote: > Caution: EXT Email > > Hi Olivier, > > On Fri, Aug 12, 2022 at 4:31 PM Olivier Masse > wrote: > > > > Add a new ioctl called TEE_IOC_SHM_REGISTER_FD to register a > > shared memory from a

[PATCH 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2022-08-12 Thread Olivier Masse
support dmabuf references that relates to physically contiguous memory buffers. New tee_shm flag to identify tee_shm objects built from a registered dmabuf: TEE_SHM_EXT_DMA_BUF. Such tee_shm structures are flagged with TEE_SHM_EXT_DMA_BUF. Co-Developed-by: Etienne Carriere Signed-off-by: Olivier

[PATCH v2 0/1] tee: Add tee_shm_register_fd

2022-08-12 Thread Olivier Masse
Add a new ioctl called TEE_IOC_SHM_REGISTER_FD to register a shared memory from a dmabuf file descriptor. This new ioctl will allow the Linux Kernel to register a buffer to be used by the Secure Data Path OPTEE OS feature. Please find more information here: https://static.linaro.org/connect/san19/

Re: [EXT] Re: [PATCH 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2022-08-12 Thread Olivier Masse
Hi Sumit, Thanks for your comments, please find my answer below. On ven., 2022-08-12 at 19:36 +0530, Sumit Garg wrote: > Caution: EXT Email > > Hi Olivier, > > On Thu, 11 Aug 2022 at 19:26, Olivier Masse > wrote: > > > > From: Etienne Carriere > > >

Re: [EXT] Re: [PATCH 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2022-08-12 Thread Olivier Masse
r words does > the > tee driver has a concept of buffers moving around? I'm not sure to understand what you mean by a moving buffer ? For information the TEE need to map the buffer in secure which is done when calling the invoke operation function. > > Am 11.08.22 um 15:56 schri

[PATCH 1/1] tee: new ioctl to a register tee_shm from a dmabuf file descriptor

2022-08-11 Thread Olivier Masse
support dmabuf references that relates to physically contiguous memory buffers. New tee_shm flag to identify tee_shm objects built from a registered dmabuf: TEE_SHM_EXT_DMA_BUF. Such tee_shm structures are flagged with TEE_SHM_EXT_DMA_BUF. Co-Developed-by: Etienne Carriere Signed-off-by: Olivier

[PATCH 0/1] tee: Add tee_shm_register_fd

2022-08-11 Thread Olivier Masse
Add a new ioctl called TEE_IOC_SHM_REGISTER_FD to register a shared memory from a dmabuf file descriptor. Etienne Carriere (1): tee: new ioctl to a register tee_shm from a dmabuf file descriptor drivers/tee/tee_core.c | 38 +++ drivers/tee/tee_shm.c| 99 ++

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-10 Thread Olivier Masse
Hi Christian, Thanks for your comments, please find my answer below. On mer., 2022-08-10 at 11:43 +0200, Christian König wrote: > Caution: EXT Email > > Hi guys, > > Am 05.08.22 um 15:53 schrieb Olivier Masse: > > add Linaro secure heap bindings: linaro,secure-heap > &g

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-09 Thread Olivier Masse
Hi Brian, > > + > > + rmem->ops = &rmem_dma_ops; > > + pr_info("Reserved memory: DMA buf secure pool %s at > > %pa, size %ld MiB\n", > > + secure_data[secure_data_count].name, > > + &rmem->base, (unsigned long)rmem->size / > > SZ_1M);

Re: [EXT] Re: [PATCH 2/3] dt-bindings: reserved-memory: add linaro,secure-heap

2022-08-09 Thread Olivier Masse
> I don't know if this should be "linaro" or something more generic, > and also where previous discussions got to about DMA heaps in DT. > > Cheers, > -Brian > > On Fri, Aug 05, 2022 at 03:53:29PM +0200, Olivier Masse wrote: > > DMABUF Reserved memo

[PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-08 Thread Olivier Masse
add Linaro secure heap compatible reserved mem: linaro,secure-heap use genalloc to allocate/free buffer from buffer pool. buffer pool info is defined from a dts reserved memory. Signed-off-by: Olivier Masse --- drivers/dma-buf/heaps/Kconfig | 9 + drivers/dma-buf/heaps/Makefile

Re: [EXT] Re: [PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-08 Thread Olivier Masse
e past about heaps in device-tree and discussions > around how "custom" heaps should be treated (though IMO this is quite > a generic one). > > On Fri, Aug 05, 2022 at 03:53:28PM +0200, Olivier Masse wrote: > > add Linaro secure heap bindings: linaro,secure-heap > > use gen

Re: [EXT] Re: [PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-05 Thread Olivier Masse
22-08-03 at 13:37 +0100, Brian Starkey wrote: > Caution: EXT Email > > Hi, > > On Wed, Aug 03, 2022 at 11:07:54AM +, Olivier Masse wrote: > > Hi Brian, > > > > Thanks for your comments, please find my reply below. > > > > On mar., 2022-08-02 at 15

[PATCH 3/3] plat-hikey: Add linaro,secure-heap compatible

2022-08-05 Thread Olivier Masse
Add DMABUF_HEAPS_SECURE in defconfig Signed-off-by: Olivier Masse --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 11 +++ arch/arm64/configs/defconfig | 2 ++ 2 files changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch

[PATCH 1/3] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-05 Thread Olivier Masse
the shared buffer. In the kernel this is done by calling dma_buf_map_attachment() 3. get sg_table with dma_buf_map_attachment in difference device. Signed-off-by: Olivier Masse --- drivers/dma-buf/heaps/Kconfig | 9 + drivers/dma-buf/heaps/Makefile | 1 + drivers/dma-buf/h

[PATCH 2/3] dt-bindings: reserved-memory: add linaro,secure-heap

2022-08-05 Thread Olivier Masse
DMABUF Reserved memory definition for OP-TEE SDP feaure. Signed-off-by: Olivier Masse --- .../reserved-memory/linaro,secure-heap.yaml | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/reserved-memory/linaro,secure-heap.yaml diff

[PATCH 0/3] Add dma-buf secure-heap

2022-08-05 Thread Olivier Masse
Purpose of these patches is to add a new dma-buf heap: linaro,secure-heap Linaro OPTEE OS Secure Data Path feature is relying on a reserved memory defined at Linux Kernel level and OPTEE OS level. >From Linux Kernel side, heap management is using dma-buf heaps interface. Olivier Masse (3):

Re: [EXT] Re: [PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-03 Thread Olivier Masse
become optional for such buffer ? > On Tue, Aug 02, 2022 at 11:58:41AM +0200, Olivier Masse wrote: > > add Linaro secure heap bindings: linaro,secure-heap > > use genalloc to allocate/free buffer from buffer pool. > > buffer pool info is from dts. > > use sg_

[PATCH 4/5] dt-bindings: reserved-memory: add linaro,secure-heap

2022-08-03 Thread Olivier Masse
DMABUF Reserved memory definition for OP-TEE SDP feaure. Signed-off-by: Olivier Masse --- .../reserved-memory/linaro,secure-heap.yaml | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/reserved-memory/linaro,secure-heap.yaml diff

[PATCH 0/5] Add dma-buf secure-heap

2022-08-03 Thread Olivier Masse
(2): ANDROID: dma-buf: heaps: Add deferred-free-helper library code ANDROID: dma-buf: heaps: Add a shrinker controlled page pool Olivier Masse (3): dma-buf: heaps: add Linaro secure dmabuf heap support dt-bindings: reserved-memory: add linaro,secure-heap plat-hikey: Add linaro,secure-heap compati

[PATCH 5/5] plat-hikey: Add linaro,secure-heap compatible

2022-08-03 Thread Olivier Masse
Add DMABUF_HEAPS_SECURE in defconfig Signed-off-by: Olivier Masse --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 11 +++ arch/arm64/configs/defconfig | 4 2 files changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch

[PATCH 1/5] ANDROID: dma-buf: heaps: Add deferred-free-helper library code

2022-08-03 Thread Olivier Masse
From: John Stultz This patch provides infrastructure for deferring buffer frees. This is a feature ION provided which when used with some form of a page pool, provides a nice performance boost in an allocation microbenchmark. The reason it helps is it allows the page-zeroing to be done out of th

[PATCH 3/5] dma-buf: heaps: add Linaro secure dmabuf heap support

2022-08-03 Thread Olivier Masse
the shared buffer. In the kernel this is done by calling dma_buf_map_attachment() 3. get sg_table with dma_buf_map_attachment in difference device. Signed-off-by: Olivier Masse --- drivers/dma-buf/heaps/Kconfig | 21 +- drivers/dma-buf/heaps/Makefile | 1 + drivers/dma-buf/h

[PATCH 2/5] ANDROID: dma-buf: heaps: Add a shrinker controlled page pool

2022-08-03 Thread Olivier Masse
: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: Andrew Morton Cc: Dave Hansen Cc: linux...@kvack.org Cc: linux-me...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Olivier Masse Bug: 168742043 --- drivers/dma-buf/heaps/Kconfig | 3