[PATCH] optee: remove address tag in check_mem_type()

2020-10-14 Thread Volodymyr Babchuk
Before passing 'start' to find_vma() we need to remove tags from it to get sane results. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/call.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index a5afbe6dee68..61420395137b

Re: [PATCH] optee: remove address tag in check_mem_type()

2020-10-12 Thread Volodymyr Babchuk
Hello Jens, Jens Wiklander writes: > On Mon, Oct 12, 2020 at 11:26 AM Volodymyr Babchuk > wrote: >> >> Before passing 'start' to find_vma() we need to remove >> tags from it to get sane results. >> >> Signed-off-by: Volodymyr Babchuk >> --- >

Re: [PATCH] optee: don't fail on unsuccessful device enumeration

2020-05-18 Thread Volodymyr Babchuk
Hi Sumit, On Fri, 15 May 2020 at 07:55, Sumit Garg wrote: > > Hi Volodymyr, > > On Fri, 15 May 2020 at 06:32, Volodymyr Babchuk > wrote: > > > > Hi Sumit, > > > > On Thu, 14 May 2020 at 08:38, Sumit Garg wrote: > > > > > > Hi Volod

Re: [PATCH] optee: don't fail on unsuccessful device enumeration

2020-05-14 Thread Volodymyr Babchuk
Hi Sumit, On Thu, 14 May 2020 at 08:38, Sumit Garg wrote: > > Hi Volodymyr, > > On Thu, 14 May 2020 at 06:48, Volodymyr Babchuk > wrote: > > > > Hi Sumit, > > > > On Wed, 13 May 2020 at 11:24, Sumit Garg wrote: > > > > > > Hi Volodymyr,

Re: [PATCH] optee: don't fail on unsuccessful device enumeration

2020-05-13 Thread Volodymyr Babchuk
Hi Sumit, On Wed, 13 May 2020 at 11:24, Sumit Garg wrote: > > Hi Volodymyr, > > On Wed, 13 May 2020 at 13:30, Jens Wiklander > wrote: > > > > Hi Volodymyr, > > > > On Wed, May 13, 2020 at 2:36 AM Volodymyr Babchuk > > wrote: > > >

[PATCH] optee: don't fail on unsuccessful device enumeration

2020-05-12 Thread Volodymyr Babchuk
of termination driver initialization. Signed-off-by: Volodymyr Babchuk --- resend: fixed email in s-o-b tag. Sorry for the noise drivers/tee/optee/core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 34409c916882

[PATCH] optee: don't fail on unsuccessful device enumeration

2020-05-12 Thread Volodymyr Babchuk
of termination driver initialization. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 34409c916882..a053930032f2 100644 --- a/drivers/tee/optee/core.c +++ b

[PATCH v3] optee: allow to work without static shared memory

2019-03-11 Thread Volodymyr Babchuk
From: Volodymyr Babchuk On virtualized systems it is possible that OP-TEE will provide only dynamic shared memory support. So it is fine to boot without static SHM enabled if dymanic one is supported. Signed-off-by: Volodymyr Babchuk --- Changes from V2: - rebased onto upstream drivers

[PATCH v2] optee: allow to work without static shared memory

2018-09-07 Thread Volodymyr Babchuk
From: Volodymyr Babchuk On virtualized systems it is possible that OP-TEE will provide only dynamic shared memory support. So it is fine to boot without static SHM enabled if dymanic one is supported. Signed-off-by: Volodymyr Babchuk --- Changes from v1: Patch is now can be applied

[PATCH v2] optee: allow to work without static shared memory

2018-09-07 Thread Volodymyr Babchuk
From: Volodymyr Babchuk On virtualized systems it is possible that OP-TEE will provide only dynamic shared memory support. So it is fine to boot without static SHM enabled if dymanic one is supported. Signed-off-by: Volodymyr Babchuk --- Changes from v1: Patch is now can be applied

[PATCH] optee: allow to work without static shared memory

2018-06-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk On virtualized systems it is possible that OP-TEE will provide only dynamic shared memory support. So it is fine to boot without static SHM enabled if dymanic one is supported. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 83

[PATCH] optee: allow to work without static shared memory

2018-06-18 Thread Volodymyr Babchuk
From: Volodymyr Babchuk On virtualized systems it is possible that OP-TEE will provide only dynamic shared memory support. So it is fine to boot without static SHM enabled if dymanic one is supported. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 83

Re: [Tee-dev] [PATCH] tee: shm: fix use-after-free via temporarily dropped reference

2018-05-07 Thread Volodymyr Babchuk
Wiklander <jens.wiklan...@linaro.org> Reviewed-by: Volodymyr Babchuk <vlad.babc...@gmail.com> -- WBR Volodymyr Babchuk aka lorc [+380976646013] mailto: vlad.babc...@gmail.com

Re: [Tee-dev] [PATCH] tee: shm: fix use-after-free via temporarily dropped reference

2018-05-07 Thread Volodymyr Babchuk
via get_dma_buf(). > > This code can only be triggered on ARM systems that use Linaro's OP-TEE. > > Fixes: 967c9cca2cc5 ("tee: generic TEE subsystem") > Signed-off-by: Jann Horn > Signed-off-by: Jens Wiklander Reviewed-by: Volodymyr Babchuk -- WBR Volodymyr Babchuk aka lorc [+380976646013] mailto: vlad.babc...@gmail.com

[RESEND PATCH v2 00/14] tee: optee: add dynamic shared memory support

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Hello all, This is resend of OP-TEE dynamic SHM series. No changes from last time. Correct version is used in the subject. --- Changes from v1: * Added support for 16K and 64K pages. Elaborated commit messages * More minor c

[RESEND PATCH v2 00/14] tee: optee: add dynamic shared memory support

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Hello all, This is resend of OP-TEE dynamic SHM series. No changes from last time. Correct version is used in the subject. --- Changes from v1: * Added support for 16K and 64K pages. Elaborated commit messages * More minor changes are described in corresponding

[RESEND PATCH v2 01/14] tee: flexible shared memory pool creation

2017-11-29 Thread Volodymyr Babchuk
; Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_private.h | 57 +--- drivers/tee/tee_shm.c | 8 +-- drivers/tee/tee_shm_pool.c | 165 - include/linux/tee_drv.h| 91 + 4

[RESEND PATCH v2 02/14] tee: add register user memory

2017-11-29 Thread Volodymyr Babchuk
From: Jens Wiklander <jens.wiklan...@linaro.org> Added new ioctl to allow users register own buffers as a shared memory. Signed-off-by: Jens Wiklander <jens.wiklan...@linaro.org> Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_core.c | 41 +

[RESEND PATCH v2 01/14] tee: flexible shared memory pool creation

2017-11-29 Thread Volodymyr Babchuk
From: Jens Wiklander Makes creation of shm pools more flexible by adding new more primitive functions to allocate a shm pool. This makes it easier to add driver specific shm pool management. Signed-off-by: Jens Wiklander Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_private.h | 57

[RESEND PATCH v2 02/14] tee: add register user memory

2017-11-29 Thread Volodymyr Babchuk
From: Jens Wiklander Added new ioctl to allow users register own buffers as a shared memory. Signed-off-by: Jens Wiklander Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_core.c | 41 +- drivers/tee/tee_shm.c| 205 +-- include

[RESEND PATCH v2 06/14] tee: optee: add page list manipulation functions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> These functions will be used to pass information about shared buffers to OP-TEE. ABI between Linux and OP-TEE is defined in optee_msg.h and optee_smc.h. optee_msg.h defines OPTEE_MSG_ATTR_NONCONTIG attribute for shared memory refe

[RESEND PATCH v2 06/14] tee: optee: add page list manipulation functions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk These functions will be used to pass information about shared buffers to OP-TEE. ABI between Linux and OP-TEE is defined in optee_msg.h and optee_smc.h. optee_msg.h defines OPTEE_MSG_ATTR_NONCONTIG attribute for shared memory references and describes how such references

[RESEND PATCH v2 09/14] tee: optee: add registered buffers handling into RPC calls

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> With latest changes to OP-TEE we can use any buffers as a shared memory. Thus, it is possible for supplicant to provide part of own memory when OP-TEE asks to allocate a shared buffer. This patch adds support for such feature into RPC ha

[RESEND PATCH v2 09/14] tee: optee: add registered buffers handling into RPC calls

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk With latest changes to OP-TEE we can use any buffers as a shared memory. Thus, it is possible for supplicant to provide part of own memory when OP-TEE asks to allocate a shared buffer. This patch adds support for such feature into RPC handling code. Now when OP-TEE asks

[RESEND PATCH v2 14/14] tee: shm: inline tee_shm_get_id()

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Now, when struct tee_shm is defined in public header, we can inline small getter functions like this one. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_shm.c | 11 --- include/linux/te

[RESEND PATCH v2 11/14] tee: optee: add optee-specific shared pool implementation

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> This is simple pool that uses kernel page allocator. This pool can be used in case OP-TEE supports dynamic shared memory. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/optee/Makefile | 1 + drive

[RESEND PATCH v2 14/14] tee: shm: inline tee_shm_get_id()

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Now, when struct tee_shm is defined in public header, we can inline small getter functions like this one. Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_shm.c | 11 --- include/linux/tee_drv.h | 5 - 2 files changed, 4 insertions(+), 12 deletions

[RESEND PATCH v2 11/14] tee: optee: add optee-specific shared pool implementation

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This is simple pool that uses kernel page allocator. This pool can be used in case OP-TEE supports dynamic shared memory. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/Makefile | 1 + drivers/tee/optee/shm_pool.c | 75

[RESEND PATCH v2 10/14] tee: optee: store OP-TEE capabilities in private data

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+)

[RESEND PATCH v2 13/14] tee: use reference counting for tee_context

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> We need to ensure that tee_context is present until last shared buffer will be freed. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_core.c| 40 +++- drivers/tee/t

[RESEND PATCH v2 10/14] tee: optee: store OP-TEE capabilities in private data

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee

[RESEND PATCH v2 13/14] tee: use reference counting for tee_context

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk We need to ensure that tee_context is present until last shared buffer will be freed. Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_core.c| 40 +++- drivers/tee/tee_private.h | 3 +++ drivers/tee/tee_shm.c | 7

[RESEND PATCH v2 05/14] tee: optee: Update protocol definitions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> There were changes in REE<->OP-TEE ABI recently. Now ABI allows us to pass non-contiguous memory buffers as list of pages to OP-TEE. This can be achieved by using new parameter attribute OPTEE_MSG_ATTR_NONCONTIG. OP-TEE also is able to

[RESEND PATCH v2 05/14] tee: optee: Update protocol definitions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk There were changes in REE<->OP-TEE ABI recently. Now ABI allows us to pass non-contiguous memory buffers as list of pages to OP-TEE. This can be achieved by using new parameter attribute OPTEE_MSG_ATTR_NONCONTIG. OP-TEE also is able to use all non-secure RAM for

[RESEND PATCH v2 12/14] tee: optee: enable dynamic SHM support

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Previous patches added various features that are needed for dynamic SHM. Dynamic SHM allows Normal World to share any buffers with OP-TEE. While original design suggested to use pre-allocated region (usually of 1M to 2M of size), this new ap

[RESEND PATCH v2 12/14] tee: optee: enable dynamic SHM support

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Previous patches added various features that are needed for dynamic SHM. Dynamic SHM allows Normal World to share any buffers with OP-TEE. While original design suggested to use pre-allocated region (usually of 1M to 2M of size), this new approach allows to use all non

[RESEND PATCH v2 08/14] tee: optee: add registered shared parameters handling

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Now, when client applications can register own shared buffers in OP-TEE, we need to extend ABI for parameter passing to/from OP-TEE. So, if OP-TEE core detects that parameter belongs to registered shared memory, it will use corresponding par

[RESEND PATCH v2 04/14] tee: shm: add page accessor functions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> In order to register a shared buffer in TEE, we need accessor function that return list of pages for that buffer. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- include/linux/tee_drv.h | 13 + 1 file

[RESEND PATCH v2 04/14] tee: shm: add page accessor functions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk In order to register a shared buffer in TEE, we need accessor function that return list of pages for that buffer. Signed-off-by: Volodymyr Babchuk --- include/linux/tee_drv.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/linux/tee_drv.h b

[RESEND PATCH v2 08/14] tee: optee: add registered shared parameters handling

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Now, when client applications can register own shared buffers in OP-TEE, we need to extend ABI for parameter passing to/from OP-TEE. So, if OP-TEE core detects that parameter belongs to registered shared memory, it will use corresponding parameter attribute. Signed-off

[RESEND PATCH v2 07/14] tee: optee: add shared buffer registration functions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> This change adds ops for shm_(un)register functions in tee interface. Client application can use these functions to (un)register an own shared buffer in OP-TEE address space. This allows zero copy data sharing between Normal and Secure

[RESEND PATCH v2 07/14] tee: optee: add shared buffer registration functions

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This change adds ops for shm_(un)register functions in tee interface. Client application can use these functions to (un)register an own shared buffer in OP-TEE address space. This allows zero copy data sharing between Normal and Secure Worlds. Please note that while

[RESEND PATCH v2 03/14] tee: shm: add accessors for buffer size and page offset

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> These two function will be needed for shared memory registration in OP-TEE Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- include/linux/tee_drv.h | 20 1 file changed, 20 insertions(+) diff --g

[RESEND PATCH v2 03/14] tee: shm: add accessors for buffer size and page offset

2017-11-29 Thread Volodymyr Babchuk
From: Volodymyr Babchuk These two function will be needed for shared memory registration in OP-TEE Signed-off-by: Volodymyr Babchuk --- include/linux/tee_drv.h | 20 1 file changed, 20 insertions(+) diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index

Re: [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-13 Thread Volodymyr Babchuk
Hello all, I'm terribly sorry. This is v2 patches, but I forgot to change subject. I think I'll leave this as, because I don't want to spam mailing lists with this series again. Or should I resend exactly this patches with right subject?

Re: [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-13 Thread Volodymyr Babchuk
Hello all, I'm terribly sorry. This is v2 patches, but I forgot to change subject. I think I'll leave this as, because I don't want to spam mailing lists with this series again. Or should I resend exactly this patches with right subject?

[PATCH v1 02/14] tee: add register user memory

2017-10-13 Thread Volodymyr Babchuk
From: Jens Wiklander <jens.wiklan...@linaro.org> Added new ioctl to allow users register own buffers as a shared memory. Signed-off-by: Jens Wiklander <jens.wiklan...@linaro.org> Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- * Removed dev_err() in cases when t

[PATCH v1 02/14] tee: add register user memory

2017-10-13 Thread Volodymyr Babchuk
From: Jens Wiklander Added new ioctl to allow users register own buffers as a shared memory. Signed-off-by: Jens Wiklander Signed-off-by: Volodymyr Babchuk --- * Removed dev_err() in cases when this is not exactly an error * tee_shm_register() return ENOTSUPP in cases when registration

[PATCH v1 14/14] tee: shm: inline tee_shm_get_id()

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Now, when struct tee_shm is defined in public header, we can inline small getter functions like this one. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- * Previously this patch moved tee_shm_is_registered() also

[PATCH v1 14/14] tee: shm: inline tee_shm_get_id()

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Now, when struct tee_shm is defined in public header, we can inline small getter functions like this one. Signed-off-by: Volodymyr Babchuk --- * Previously this patch moved tee_shm_is_registered() also, but now it is declared as inline in the same patch

[PATCH v1 13/14] tee: use reference counting for tee_context

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> We need to ensure that tee_context is present until last shared buffer will be freed. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_core.c| 40 +++- drivers/tee/t

[PATCH v1 13/14] tee: use reference counting for tee_context

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk We need to ensure that tee_context is present until last shared buffer will be freed. Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_core.c| 40 +++- drivers/tee/tee_private.h | 3 +++ drivers/tee/tee_shm.c | 7

[PATCH v1 11/14] tee: optee: add optee-specific shared pool implementation

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> This is simple pool that uses kernel page allocator. This pool can be used in case OP-TEE supports dynamic shared memory. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/optee/Makefile | 1 + drive

[PATCH v1 12/14] tee: optee: enable dynamic SHM support

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Previous patches added various features that are needed for dynamic SHM. Dynamic SHM allows Normal World to share any buffers with OP-TEE. While original design suggested to use pre-allocated region (usually of 1M to 2M of size), this new ap

[PATCH v1 11/14] tee: optee: add optee-specific shared pool implementation

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This is simple pool that uses kernel page allocator. This pool can be used in case OP-TEE supports dynamic shared memory. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/Makefile | 1 + drivers/tee/optee/shm_pool.c | 75

[PATCH v1 12/14] tee: optee: enable dynamic SHM support

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Previous patches added various features that are needed for dynamic SHM. Dynamic SHM allows Normal World to share any buffers with OP-TEE. While original design suggested to use pre-allocated region (usually of 1M to 2M of size), this new approach allows to use all non

[PATCH v1 09/14] tee: optee: add registered buffers handling into RPC calls

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> With latest changes to OP-TEE we can use any buffers as a shared memory. Thus, it is possible for supplicant to provide part of own memory when OP-TEE asks to allocate a shared buffer. This patch adds support for such feature into RPC ha

[PATCH v1 09/14] tee: optee: add registered buffers handling into RPC calls

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk With latest changes to OP-TEE we can use any buffers as a shared memory. Thus, it is possible for supplicant to provide part of own memory when OP-TEE asks to allocate a shared buffer. This patch adds support for such feature into RPC handling code. Now when OP-TEE asks

[PATCH v1 10/14] tee: optee: store OP-TEE capabilities in private data

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+)

[PATCH v1 10/14] tee: optee: store OP-TEE capabilities in private data

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee

[PATCH v1 07/14] tee: optee: add shared buffer registration functions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> This change adds ops for shm_(un)register functions in tee interface. Client application can use these functions to (un)register an own shared buffer in OP-TEE address space. This allows zero copy data sharing between Normal and Secure

[PATCH v1 07/14] tee: optee: add shared buffer registration functions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This change adds ops for shm_(un)register functions in tee interface. Client application can use these functions to (un)register an own shared buffer in OP-TEE address space. This allows zero copy data sharing between Normal and Secure Worlds. Please note that while

[PATCH v1 08/14] tee: optee: add registered shared parameters handling

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Now, when client applications can register own shared buffers in OP-TEE, we need to extend ABI for parameter passing to/from OP-TEE. So, if OP-TEE core detects that parameter belongs to registered shared memory, it will use corresponding par

[PATCH v1 08/14] tee: optee: add registered shared parameters handling

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Now, when client applications can register own shared buffers in OP-TEE, we need to extend ABI for parameter passing to/from OP-TEE. So, if OP-TEE core detects that parameter belongs to registered shared memory, it will use corresponding parameter attribute. Signed-off

[PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Changes from v1: * Added support for 16K and 64K pages. * Elaborated commit messages * More minor changes are described in corresponding patches. While this patches are necessary for use OP-TEE in virualized envir

[PATCH v1 01/14] tee: flexible shared memory pool creation

2017-10-13 Thread Volodymyr Babchuk
; Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_private.h | 57 +--- drivers/tee/tee_shm.c | 8 +-- drivers/tee/tee_shm_pool.c | 165 - include/linux/tee_drv.h| 91 + 4

[PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Changes from v1: * Added support for 16K and 64K pages. * Elaborated commit messages * More minor changes are described in corresponding patches. While this patches are necessary for use OP-TEE in virualized environment, they are not sufficient. Stuart Yoder

[PATCH v1 01/14] tee: flexible shared memory pool creation

2017-10-13 Thread Volodymyr Babchuk
From: Jens Wiklander Makes creation of shm pools more flexible by adding new more primitive functions to allocate a shm pool. This makes it easier to add driver specific shm pool management. Signed-off-by: Jens Wiklander Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_private.h | 57

[PATCH v1 04/14] tee: shm: add page accessor functions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> In order to register a shared buffer in TEE, we need accessor function that return list of pages for that buffer. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- * Removed check for validity of num_pages pointer. A

[PATCH v1 05/14] tee: optee: Update protocol definitions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> There were changes in REE<->OP-TEE ABI recently. Now ABI allows us to pass non-contiguous memory buffers as list of pages to OP-TEE. This can be achieved by using new parameter attribute OPTEE_MSG_ATTR_NONCONTIG. OP-TEE also is able to

[PATCH v1 06/14] tee: optee: add page list manipulation functions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> These functions will be used to pass information about shared buffers to OP-TEE. ABI between Linux and OP-TEE is defined in optee_msg.h and optee_smc.h. optee_msg.h defines OPTEE_MSG_ATTR_NONCONTIG attribute for shared memory refe

[PATCH v1 05/14] tee: optee: Update protocol definitions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk There were changes in REE<->OP-TEE ABI recently. Now ABI allows us to pass non-contiguous memory buffers as list of pages to OP-TEE. This can be achieved by using new parameter attribute OPTEE_MSG_ATTR_NONCONTIG. OP-TEE also is able to use all non-secure RAM for

[PATCH v1 06/14] tee: optee: add page list manipulation functions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk These functions will be used to pass information about shared buffers to OP-TEE. ABI between Linux and OP-TEE is defined in optee_msg.h and optee_smc.h. optee_msg.h defines OPTEE_MSG_ATTR_NONCONTIG attribute for shared memory references and describes how such references

[PATCH v1 04/14] tee: shm: add page accessor functions

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk In order to register a shared buffer in TEE, we need accessor function that return list of pages for that buffer. Signed-off-by: Volodymyr Babchuk --- * Removed check for validity of num_pages pointer. As Yury Norov pointed, this check can lead to mistakes

[PATCH v1 03/14] tee: shm: add accessors for buffer size and page offset

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> These two function will be needed for shared memory registration in OP-TEE Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- include/linux/tee_drv.h | 20 1 file changed, 20 insertions(+) diff --g

[PATCH v1 03/14] tee: shm: add accessors for buffer size and page offset

2017-10-13 Thread Volodymyr Babchuk
From: Volodymyr Babchuk These two function will be needed for shared memory registration in OP-TEE Signed-off-by: Volodymyr Babchuk --- include/linux/tee_drv.h | 20 1 file changed, 20 insertions(+) diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index

Re: [Tee-dev] [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-04 Thread Volodymyr Babchuk
Hello Stuart, On 03.10.17 19:05, Stuart Yoder wrote: On 9/28/17 1:03 PM, Volodymyr Babchuk wrote: From: Volodymyr Babchuk <vlad.babc...@gmail.com> This patch series enables dynamic shared memory support in the TEE subsystem as a whole and in OP-TEE in particular. Global Platfo

Re: [Tee-dev] [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-10-04 Thread Volodymyr Babchuk
Hello Stuart, On 03.10.17 19:05, Stuart Yoder wrote: On 9/28/17 1:03 PM, Volodymyr Babchuk wrote: From: Volodymyr Babchuk This patch series enables dynamic shared memory support in the TEE subsystem as a whole and in OP-TEE in particular. Global Platform TEE specification [1] allows

Re: [PATCH v1 07/14] tee: optee: add shared buffer registration functions

2017-09-29 Thread Volodymyr Babchuk
On 29.09.17 16:06, Mark Rutland wrote: On Thu, Sep 28, 2017 at 09:04:04PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk <vlad.babc...@gmail.com> This change adds ops for shm_(un)register functions in tee interface. Client application can use these functions to (un)register

Re: [PATCH v1 07/14] tee: optee: add shared buffer registration functions

2017-09-29 Thread Volodymyr Babchuk
On 29.09.17 16:06, Mark Rutland wrote: On Thu, Sep 28, 2017 at 09:04:04PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk This change adds ops for shm_(un)register functions in tee interface. Client application can use these functions to (un)register an own shared buffer in OP-TEE

Re: [PATCH v1 02/14] tee: add register user memory

2017-09-29 Thread Volodymyr Babchuk
On 29.09.17 13:53, Mark Rutland wrote: On Thu, Sep 28, 2017 at 09:03:59PM +0300, Volodymyr Babchuk wrote: +static int +tee_ioctl_shm_register(struct tee_context *ctx, + struct tee_ioctl_shm_register_data __user *udata) +{ + long ret; + struct

Re: [PATCH v1 02/14] tee: add register user memory

2017-09-29 Thread Volodymyr Babchuk
On 29.09.17 13:53, Mark Rutland wrote: On Thu, Sep 28, 2017 at 09:03:59PM +0300, Volodymyr Babchuk wrote: +static int +tee_ioctl_shm_register(struct tee_context *ctx, + struct tee_ioctl_shm_register_data __user *udata) +{ + long ret; + struct

Re: [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-09-29 Thread Volodymyr Babchuk
Hello Mark, On 29.09.17 13:31, Mark Rutland wrote: Hi, On Thu, Sep 28, 2017 at 09:03:57PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk <vlad.babc...@gmail.com> This patch series enables dynamic shared memory support in the TEE subsystem as a whole and in OP-TEE in part

Re: [PATCH v1 00/14] tee: optee: add dynamic shared memory support

2017-09-29 Thread Volodymyr Babchuk
Hello Mark, On 29.09.17 13:31, Mark Rutland wrote: Hi, On Thu, Sep 28, 2017 at 09:03:57PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk This patch series enables dynamic shared memory support in the TEE subsystem as a whole and in OP-TEE in particular. Global Platform TEE

Re: [PATCH v1 06/14] tee: optee: add page list manipulation functions

2017-09-29 Thread Volodymyr Babchuk
On 29.09.17 03:23, Yury Norov wrote: On Thu, Sep 28, 2017 at 09:04:03PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk <vlad.babc...@gmail.com> These functions will be used to pass information about shared buffers to OP-TEE. Signed-off-by: Volodymyr Babchuk <vlad.babc...@

Re: [PATCH v1 06/14] tee: optee: add page list manipulation functions

2017-09-29 Thread Volodymyr Babchuk
On 29.09.17 03:23, Yury Norov wrote: On Thu, Sep 28, 2017 at 09:04:03PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk These functions will be used to pass information about shared buffers to OP-TEE. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/call.c | 48

Re: [PATCH v1 04/14] tee: shm: add page accessor functions

2017-09-29 Thread Volodymyr Babchuk
Hi Yury, On 29.09.17 01:14, Yury Norov wrote: Hi Volodymyr, On Thu, Sep 28, 2017 at 09:04:01PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk <vlad.babc...@gmail.com> In order to register a shared buffer in TEE, we need accessor function that return list of pages for that

Re: [PATCH v1 04/14] tee: shm: add page accessor functions

2017-09-29 Thread Volodymyr Babchuk
Hi Yury, On 29.09.17 01:14, Yury Norov wrote: Hi Volodymyr, On Thu, Sep 28, 2017 at 09:04:01PM +0300, Volodymyr Babchuk wrote: From: Volodymyr Babchuk In order to register a shared buffer in TEE, we need accessor function that return list of pages for that buffer. Signed-off-by: Volodymyr

[PATCH v1 13/14] tee: use reference counting for tee_context

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> We need to ensure that tee_context is present until last shared buffer will be freed. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_core.c| 40 +++- drivers/tee/t

[PATCH v1 13/14] tee: use reference counting for tee_context

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk We need to ensure that tee_context is present until last shared buffer will be freed. Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_core.c| 40 +++- drivers/tee/tee_private.h | 3 +++ drivers/tee/tee_shm.c | 7

[PATCH v1 14/14] tee: shm: inline tee_shm getter functions

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Now, when struct tee_shm is defined in public header, we can inline small getter functions. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/tee_shm.c | 17 - include/linux/tee_drv.h | 10 +

[PATCH v1 14/14] tee: shm: inline tee_shm getter functions

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Now, when struct tee_shm is defined in public header, we can inline small getter functions. Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_shm.c | 17 - include/linux/tee_drv.h | 10 -- 2 files changed, 8 insertions(+), 19 deletions

[PATCH v1 12/14] tee: optee: enable dynamic SHM support

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Previous patches added various features that are needed for dynamic SHM. Dynamic SHM allows Normal World to share any buffers with OP-TEE. While original design suggested to use pre-allocated region (usually of 1M to 2M of size), this new ap

[PATCH v1 12/14] tee: optee: enable dynamic SHM support

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Previous patches added various features that are needed for dynamic SHM. Dynamic SHM allows Normal World to share any buffers with OP-TEE. While original design suggested to use pre-allocated region (usually of 1M to 2M of size), this new approach allows to use all non

[PATCH v1 11/14] tee: optee: add optee-specific shared pool implementation

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> This is simple pool that uses kernel page allocator. This pool can be used in case OP-TEE supports dynamic shared memory. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/optee/Makefile | 1 + drive

[PATCH v1 11/14] tee: optee: add optee-specific shared pool implementation

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk This is simple pool that uses kernel page allocator. This pool can be used in case OP-TEE supports dynamic shared memory. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/Makefile | 1 + drivers/tee/optee/shm_pool.c | 75

[PATCH v1 10/14] tee: optee: store OP-TEE capabilities in private data

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk <vlad.babc...@gmail.com> --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+)

[PATCH v1 10/14] tee: optee: store OP-TEE capabilities in private data

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk Those capabilities will be used in subsequent patches. Signed-off-by: Volodymyr Babchuk --- drivers/tee/optee/core.c | 1 + drivers/tee/optee/optee_private.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee

[PATCH v1 09/14] tee: optee: add registered buffers handling into RPC calls

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> With latest changes to OP-TEE we can use any buffers as a shared memory. Thus, it is possible for supplicant to provide part of own memory when OP-TEE asks to allocate a shared buffer. This patch adds support for such feature into RPC ha

[PATCH v1 08/14] tee: optee: add registered shared parameters handling

2017-09-28 Thread Volodymyr Babchuk
From: Volodymyr Babchuk <vlad.babc...@gmail.com> Now, when client applications can register own shared buffers in OP-TEE, we need to extend ABI for parameter passing to/from OP-TEE. So, if OP-TEE core detects that parameter belongs to registered shared memory, it will use corresponding par

  1   2   >