Re: [PATCH] dt-bindings: arm: firmware: Convert linaro,optee-tz to json schema

2021-04-20 Thread Jens Wiklander
b2c > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > @@ -0,0 +1,62 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/firmware/linaro,optee-tz.yaml# > +$schem

[PATCH] optee: use export_uuid() to copy client UUID

2021-04-20 Thread Jens Wiklander
in order to avoid casting. Fixes: c5b4312bea5d ("tee: optee: Add support for session login client UUID generation") Suggested-by: Andy Shevchenko Signed-off-by: Jens Wiklander --- drivers/tee/optee/call.c | 6 -- drivers/tee/optee/optee_msg.h | 6 -- 2 files changed, 8 insert

Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values

2021-04-19 Thread Jens Wiklander
On Mon, Apr 19, 2021 at 3:40 PM Andy Shevchenko wrote: > > On Mon, Apr 19, 2021 at 4:30 PM Jens Wiklander > wrote: > > On Mon, Apr 19, 2021 at 2:01 PM Andy Shevchenko > > wrote: > > > > > > On Mon, Apr 19, 2021 at 01:35:51PM +0200, Jens Wiklander wrote:

Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values

2021-04-19 Thread Jens Wiklander
On Mon, Apr 19, 2021 at 2:01 PM Andy Shevchenko wrote: > > On Mon, Apr 19, 2021 at 01:35:51PM +0200, Jens Wiklander wrote: > > On Thu, Apr 15, 2021 at 4:58 PM Andy Shevchenko > > wrote: > > Thanks for review, my answer below. > > > >

Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values

2021-04-19 Thread Jens Wiklander
Hi Andy, On Thu, Apr 15, 2021 at 4:58 PM Andy Shevchenko wrote: > > Dereferencing something to uuid_t value is not good idea strictly speaking. > Provide a special parameter field for UUID values and drop ugly casting. > > Signed-off-by: Andy Shevchenko > --- > drivers/tee/optee/call.c |

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-14 Thread Jens Wiklander
Hi Jiro, On Mon, Apr 12, 2021 at 12:20 PM Rijo Thomas wrote: > > > > On 12/04/21 1:06 pm, Jens Wiklander wrote: > > On Mon, Apr 5, 2021 at 11:43 AM Rijo Thomas > > wrote: > >> > >> Same Trusted Application (TA) can be loaded in multiple TEE context

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-12 Thread Jens Wiklander
On Mon, Apr 5, 2021 at 11:43 AM Rijo Thomas wrote: > > Same Trusted Application (TA) can be loaded in multiple TEE contexts. > > If it is a single instance TA, the TA should not get unloaded from AMD > Secure Processor, while it is still in use in another TEE context. > > Therefore reference

Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

2021-04-06 Thread Jens Wiklander
Hi Heiko, [+Arnd] On Tue, Apr 6, 2021 at 12:38 PM Heiko Thiery wrote: > > Hi Jens, > > Am Di., 30. März 2021 um 10:26 Uhr schrieb Jens Wiklander > : > > > > On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote: > > > If build kernel witho

Re: [GIT PULL] OP-TEE tracepoints fix for v5.13

2021-04-01 Thread Jens Wiklander
On Thu, Apr 1, 2021 at 12:23 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > On Tue, 30 Mar 2021 10:22:08 +0200, Jens Wiklander wrote: > > The previous pull request for OP-TEE tracepoints introduced a build > > error when building whithout O=..., apparently many re

Re: [PATCH 1/1] tee: optee: do not check memref size on return from Secure World

2021-04-01 Thread Jens Wiklander
heck in optee_from_msg_param() is incorrect and > > needs to be removed. This fixes a number of failed test cases in the > > GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09 > > when OP-TEE is compiled without dynamic shared memory support > > (CFG

Re: Build breakage in next-20210330 due to optee_trace.h

2021-03-31 Thread Jens Wiklander
Hi Pratyush, On Wed, Mar 31, 2021 at 4:03 AM Pratyush Yadav wrote: > > Hi, > > I recently rebased a dev branch on top of next-20210330 (4143e05b7b17) > and I notice a build error from the optee driver: > > In file included from drivers/tee/optee/call.c:18: > In file included from

[GIT PULL] OP-TEE memref size check for v5.13

2021-03-30 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch for the OP-TEE driver to remove the invalid size check of outgoing memref parameters. This code path is only activated for a certain configuration of OP-TEE in secure world (CFG_CORE_DYN_SHM=n) so this problem isn't always visible. Thanks,

Re: [PATCH] tee: optee: fix build error caused by recent optee tracepoints feature

2021-03-30 Thread Jens Wiklander
On Thu, Mar 25, 2021 at 12:06:01PM +0800, Jisheng Zhang wrote: > If build kernel without "O=dir", below error will be seen: > > In file included from drivers/tee/optee/optee_trace.h:67, > from drivers/tee/optee/call.c:18: > ./include/trace/define_trace.h:95:42: fatal error:

[GIT PULL] OP-TEE tracepoints fix for v5.13

2021-03-30 Thread Jens Wiklander
Hello arm-soc maintainers, The previous pull request for OP-TEE tracepoints introduced a build error when building whithout O=..., apparently many regression builds uses that option. Please pull this small fix for the build error. Thanks, Jens The following changes since commit

[PATCH 4/6] optee: refactor driver with internal callbacks

2021-03-25 Thread Jens Wiklander
makes room for using other primitives to communicate with OP-TEE in secure world while being able to reuse as much as possible from the present driver. Signed-off-by: Jens Wiklander --- drivers/tee/optee/call.c | 78 --- drivers/tee/optee/core.c | 158

[PATCH 6/6] optee: add FF-A support

2021-03-25 Thread Jens Wiklander
to include the information needed. The FF-A part of this driver is enabled if CONFIG_ARM_FFA_TRANSPORT is enabled. [1] https://developer.arm.com/documentation/den0077/latest Signed-off-by: Jens Wiklander --- drivers/tee/optee/call.c | 222 +- drivers/tee/optee/core.c | 485

[PATCH 1/6] tee: add sec_world_id to struct tee_shm

2021-03-25 Thread Jens Wiklander
Adds sec_world_id to struct tee_shm which describes a shared memory object. sec_world_id can be used by a driver to store an id assigned by secure world. Signed-off-by: Jens Wiklander --- include/linux/tee_drv.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include

[PATCH 3/6] optee: sync optee_msg.h and optee_rpc_cmd.h

2021-03-25 Thread Jens Wiklander
they are forwarded as opaque requests to tee-supplicant. Signed-off-by: Jens Wiklander --- drivers/tee/optee/optee_msg.h | 143 + drivers/tee/optee/optee_rpc_cmd.h | 333 ++ drivers/tee/optee/rpc.c | 32 +-- 3 files changed, 360 insertions(+), 148 deletions

[PATCH 5/6] optee: add a FF-A memory pool

2021-03-25 Thread Jens Wiklander
Adds a memory pool to be used when the driver uses FF-A [1] as transport layer. [1] https://developer.arm.com/documentation/den0077/latest Signed-off-by: Jens Wiklander --- drivers/tee/optee/shm_pool.c | 65 +--- drivers/tee/optee/shm_pool.h | 1 + 2 files

[PATCH 0/6] Add FF-A support in OP-TEE driver

2021-03-25 Thread Jens Wiklander
, Jens [1] https://developer.arm.com/documentation/den0077/latest [2] https://lore.kernel.org/linux-arm-kernel/20210212154614.38604-1-sudeep.ho...@arm.com/ [3] git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git v5.11/ffa Jens Wiklander (6): tee: add sec_world_id to struct tee_s

[PATCH 2/6] optee: simplify optee_release()

2021-03-25 Thread Jens Wiklander
Simplifies optee_release() with a new helper function, optee_close_session_helper() which has been factored out from optee_close_session(). A separate optee_release_supp() is added for the supplicant device. Signed-off-by: Jens Wiklander --- drivers/tee/optee/call.c | 31

Re: [PATCH] tee: optee: add invoke_fn tracepoints

2021-03-25 Thread Jens Wiklander
On Thu, Mar 25, 2021 at 3:50 AM Jisheng Zhang wrote: > > On Wed, 24 Mar 2021 10:53:13 -0400 > Steven Rostedt wrote: > > > > > > On Wed, 24 Mar 2021 07:48:53 -0700 > > Guenter Roeck wrote: > > > > > On Wed, Mar 24, 2021 at 07:34:07AM -0700, Guenter Roeck wrote: > > > > On Wed, Feb 10, 2021 at

Re: [PATCH v2 1/2] optee: fix tee out of memory failure seen during kexec reboot

2021-03-19 Thread Jens Wiklander
On Tue, Mar 16, 2021 at 2:21 PM Allen Pais wrote: > > > > >> > >> [0.368428] tee_bnxt_fw optee-clnt0: tee_shm_alloc failed > >> [0.368461] tee_bnxt_fw: probe of optee-clnt0 failed with error -22 > >> > >> tee_shm_release() is not invoked on dma shm buffer. > >> > >> Implement .shutdown()

Re: [PATCH] optee: enable apci support

2021-03-17 Thread Jens Wiklander
On Fri, Mar 12, 2021 at 04:36:53PM +0800, Ran Wang wrote: > This patch add ACPI support for optee driver. > > Signed-off-by: Ran Wang > --- > drivers/tee/optee/core.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c >

[GIT PULL] OP-TEE tracepoints for v5.13

2021-03-15 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this patch adding tracepoints around calls to OP-TEE in secure world. Thanks, Jens The following changes since commit a38fd8748464831584a19438cbb3082b5a2dab15: Linux 5.12-rc2 (2021-03-05 17:33:41 -0800) are available in the Git repository at:

Re: [PATCH] tee: amdtee: unload TA only when its refcount becomes 0

2021-03-15 Thread Jens Wiklander
On Sun, Mar 07, 2021 at 12:05:01PM +0530, Rijo Thomas wrote: > Same Trusted Application (TA) can be loaded in multiple TEE contexts. > > If it is a single instance TA, the TA should not get unloaded from AMD > Secure Processor, while it is still in use in another TEE context. > > Therefore

Re: [PATCH v2 1/2] optee: fix tee out of memory failure seen during kexec reboot

2021-03-01 Thread Jens Wiklander
On Thu, Feb 25, 2021 at 10:06 AM Allen Pais wrote: > > From: Allen Pais > > The following out of memory errors are seen on kexec reboot > from the optee core. > > [0.368428] tee_bnxt_fw optee-clnt0: tee_shm_alloc failed > [0.368461] tee_bnxt_fw: probe of optee-clnt0 failed with error -22

Re: [PATCH 1/2] optee: fix tee out of memory failure seen during kexec reboot

2021-02-24 Thread Jens Wiklander
On Tue, Feb 23, 2021 at 09:56:13PM +0530, Allen Pais wrote: > > > > > > > - /* > > > > > - * Ask OP-TEE to free all cached shared memory objects to > > > > > decrease > > > > > - * reference counters and also avoid wild pointers in secure > > > > > world > > > > > - * into

Re: [PATCH] tee: optee: add invoke_fn tracepoints

2021-02-24 Thread Jens Wiklander
On Tue, Feb 23, 2021 at 09:19:36AM -0500, Steven Rostedt wrote: > On Tue, 23 Feb 2021 14:11:24 +0100 > Jens Wiklander wrote: > > > I used the -strict option. > > > > ./scripts/checkpatch.pl -strict > > 0001-tee-optee-add-invoke_fn-tracepoints.patch > >

Re: [PATCH] tee: optee: add invoke_fn tracepoints

2021-02-23 Thread Jens Wiklander
On Tue, Feb 23, 2021 at 06:40:26PM +0800, Jisheng Zhang wrote: > On Tue, 23 Feb 2021 08:59:22 +0100 Jens Wiklander wrote: > > > > > > Hi Jisheng, > > Hi Jens, > > > > > On Wed, Feb 10, 2021 at 7:44 AM Jisheng Zhang > > wrote: > >

Re: [PATCH 1/2] optee: fix tee out of memory failure seen during kexec reboot

2021-02-23 Thread Jens Wiklander
On Mon, Feb 22, 2021 at 06:15:08PM +0530, Allen Pais wrote: > > > On Wed, 17 Feb 2021 14:57:12 +0530, Allen Pais wrote: > > > - /* > > > - * Ask OP-TEE to free all cached shared memory objects to decrease > > > - * reference counters and also avoid wild pointers in secure world > > > - * into

Re: [PATCH] tee: optee: add invoke_fn tracepoints

2021-02-23 Thread Jens Wiklander
Hi Jisheng, On Wed, Feb 10, 2021 at 7:44 AM Jisheng Zhang wrote: > > Add tracepoints to retrieve information about the invoke_fn. This would > help to measure how many invoke_fn are triggered and how long it takes > to complete one invoke_fn call. > > Signed-off-by: Jisheng Zhang > --- > >

[GIT PULL] OP-TEE I2C simplification for v5.12

2021-02-08 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this fix eliminating a stack frame size warning and also simplifying I2C access in the OP-TEE driver. Thanks, Jens The following changes since commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62: Linux 5.11-rc2 (2021-01-03 15:55:30 -0800) are available in

Re: [PATCH] optee: simplify i2c access

2021-02-08 Thread Jens Wiklander
On Mon, Feb 8, 2021 at 9:32 AM Jorge Ramirez-Ortiz, Foundries wrote: > > On 08/02/21, Jorge Ramirez-Ortiz, Foundries wrote: > > On 08/02/21, Jens Wiklander wrote: > > > Hi Jorge, > > > > > > On Wed, Jan 27, 2021 at 11:41 AM Jens Wiklande

Re: [PATCH] optee: simplify i2c access

2021-02-07 Thread Jens Wiklander
Hi Jorge, On Wed, Jan 27, 2021 at 11:41 AM Jens Wiklander wrote: > > Hi Arnd, > > On Mon, Jan 25, 2021 at 12:38 PM Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > Storing a bogus i2c_client structure on the stack adds overhead and > > causes a

[GIT PULL] OP-TEE fix for v5.12

2021-02-03 Thread Jens Wiklander
:11:11 +0100) Remove unnecessary need_resched() before cond_resched() Jens Wiklander (1): tee: optee: remove need_resched() before cond_resched() Rouven

[GIT PULL] TEE housekeeping for v5.12

2021-02-03 Thread Jens Wiklander
Bjorn Helgaas (1): tee: optee: fix 'physical' typos Elvira Khabirova (1): tee: fix some comment typos in header files Jens Wiklander (1): optee: sync OP-TEE headers Tian Tao (1): drivers: optee: use flexible-array member instead of zero-length array drivers/tee/optee

Re: [PATCH] tee: fix some comment typos in header files

2021-02-03 Thread Jens Wiklander
On Sun, Sep 20, 2020 at 3:58 AM Elvira Khabirova wrote: > > struct tee_param: revc -> recv. > TEE_IOC_SUPPL_SEND: typo introduced by copy-pasting, replace invalid > description with description from the according argument struct. > > Signed-off-by: Elvira Khabirova > --- >

Re: [PATCH] tee: optee: remove need_resched() before cond_resched()

2021-02-02 Thread Jens Wiklander
On Fri, Jan 29, 2021 at 02:29:33PM +0100, Jens Wiklander wrote: > Hi Rouven and Sumit, > > On Mon, Jan 25, 2021 at 10:58 AM Jens Wiklander via OP-TEE > wrote: > > > > Hi Rouven and Sumit, > > > > On Mon, Jan 25, 2021 at 10:55 AM Jens Wiklander > >

Re: [PATCH] optee: sync OP-TEE headers

2021-02-02 Thread Jens Wiklander
On Tue, Feb 2, 2021 at 5:47 AM Sumit Garg wrote: > > On Fri, 29 Jan 2021 at 19:13, Jens Wiklander via OP-TEE > wrote: > > > > Pulls in updates in the internal headers from OP-TEE OS [1]. A few > > defines has been shortened, hence the changes in rpc.c. Defines

Re: [PATCH] optee: simplify i2c access

2021-01-27 Thread Jens Wiklander
> and avoids the warning. > > Fixes: c05210ab9757 ("drivers: optee: allow op-tee to access devices on the > i2c bus") > Signed-off-by: Arnd Bergmann > --- > drivers/tee/optee/rpc.c | 31 --- > 1 file changed, 16 insertions(+), 15 deletions(-

Re: [PATCH] tee: optee: remove need_resched() before cond_resched()

2021-01-26 Thread Jens Wiklander
Hi Rouven and Sumit, On Mon, Jan 25, 2021 at 10:55 AM Jens Wiklander wrote: > > Testing need_resched() before cond_resched() is not needed as an > equivalent test is done internally in cond_resched(). So drop the > need_resched() test. > > Fixes: dcb3b06d9c34 ("tee: opt

[PATCH] tee: optee: remove need_resched() before cond_resched()

2021-01-25 Thread Jens Wiklander
Testing need_resched() before cond_resched() is not needed as an equivalent test is done internally in cond_resched(). So drop the need_resched() test. Fixes: dcb3b06d9c34 ("tee: optee: replace might_sleep with cond_resched") Signed-off-by: Jens Wiklander --- drivers/tee/optee/call.c

[GIT PULL] OP-TEE driver fix for v5.11

2021-01-21 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch taking care of a rcu_sched trace in some corner cases when OP-TEE is invoked. Thanks, Jens The following changes since commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62: Linux 5.11-rc2 (2021-01-03 15:55:30 -0800) are available in the Git

Re: [PATCH v2] tee: optee: replace might_sleep with cond_resched

2021-01-21 Thread Jens Wiklander
On Tue, Jan 5, 2021 at 11:29 AM Rouven Czerwinski wrote: > > might_sleep() is a debugging aid and triggers rescheduling only for > certain kernel configurations. Replace with an explicit check and > reschedule to work for all kernel configurations. Fixes the following > trace: > > [

Re: [PATCH] tee: optee: replace might_sleep with cond_resched

2021-01-04 Thread Jens Wiklander
On Tue, Jan 5, 2021 at 6:42 AM Sumit Garg wrote: > > On Fri, 25 Sept 2020 at 12:29, Jens Wiklander via OP-TEE > wrote: > > > > On Fri, Sep 18, 2020 at 7:45 PM Rouven Czerwinski > > wrote: > > > > > > On Kernels with CONFIG_PREEMPT_NONE might_slee

Re: [PATCH] optee: extend normal memory check to also write-through

2020-12-02 Thread Jens Wiklander
On Wed, Dec 2, 2020 at 10:41 AM ZHIZHIKIN Andrey wrote: > > Hello Jens, > > > -Original Message- > > From: Jens Wiklander > > Sent: Wednesday, December 2, 2020 9:07 AM > > To: ZHIZHIKIN Andrey > > Cc: op-...@lists.trustedfirmware.org; Linux Kernel

Re: [PATCH] optee: extend normal memory check to also write-through

2020-12-02 Thread Jens Wiklander
Hi Andrey, On Wed, Dec 2, 2020 at 8:11 AM Andrey Zhizhikin wrote: > > ARMv7 Architecture Reference Manual [1] section A3.5.5 details Normal > memory type, together with cacheability attributes that could be applied > to memory regions defined as "Normal memory". > > Section B2.1.2 of the

Re: [GIT PULL] OP-TEE driver for v5.11

2020-11-26 Thread Jens Wiklander
Hi Arnd, On Thu, Nov 26, 2020 at 10:00 PM Arnd Bergmann wrote: > > On Wed, Nov 25, 2020 at 1:01 PM Jens Wiklander > wrote: > > > > Hello arm-soc maintainers, > > > > Please pull this small patch which allows the OP-TEE driver to work with > > ARMv7 based

[GIT PULL] OP-TEE driver for v5.11

2020-11-25 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch which allows the OP-TEE driver to work with ARMv7 based single CPU systems. Thanks, Jens The following changes since commit 3cea11cd5e3b00d91caf0b4730194039b45c5891: Linux 5.10-rc2 (2020-11-01 14:43:51 -0800) are available in the Git

Re: [PATCH] optee: add writeback to valid memory type

2020-11-25 Thread Jens Wiklander
On Fri, Nov 13, 2020 at 4:06 PM Rui Miguel Silva wrote: > > Only in smp systems the cache policy is setup as write alloc, in > single cpu systems the cache policy is set as writeback and it is > normal memory, so, it should pass the is_normal_memory check in the > share memory registration. > >

Re: [PATCH] Properly check tee_shm buffer mmap offset

2020-11-23 Thread Jens Wiklander
Hi, On Mon, Nov 23, 2020 at 8:10 AM gaoyusong wrote: > > The memmap options in tee_shm_op_mmap were not being checked for all > sets of possible crazy values. Fix this up by properly check tee_shm > buffer offsets. > > Signed-off-by: gaoyusong > --- > drivers/tee/tee_shm.c | 10 ++ > 1

Re: [PATCH 061/141] tee: Fix fall-through warnings for Clang

2020-11-22 Thread Jens Wiklander
ssues/115 > Signed-off-by: Gustavo A. R. Silva > --- > drivers/tee/tee_core.c | 1 + > 1 file changed, 1 insertion(+) Acked-by: Jens Wiklander Thanks, Jens

[GIT PULL] AMDTEE driver fixes for v5.10

2020-11-09 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull these AMDTEE driver fixes which are needed when opening multiple contexts or file descriptors. Note that this isn't a usual Arm driver update. This targets x86/AMD instead, but is still part of the TEE subsystem. Thanks, Jens The following changes since

Re: [PATCH 0/2] AMD-TEE driver bug fixes

2020-11-08 Thread Jens Wiklander
Hi Rijo, On Wed, Nov 4, 2020 at 7:26 AM Rijo Thomas wrote: > > AMD-TEE driver keeps track of shared memory buffers and their > corresponding buffer id's in a global linked list. These buffers are > used to share data between x86 and AMD Secure Processor. This patchset > fixes issues related to

Re: [PATCH] tee: optee: Set a flag to avoid memory leaks

2020-10-26 Thread Jens Wiklander
Hi, On Mon, Oct 26, 2020 at 3:22 AM Wang, Xiaolei wrote: > > When an rpc message to release memory is not received, a memory leak will > occur, which should be released > > > > unreferenced object 0x6871b580 (size 128): > > comm "swapper/0", pid 1, jiffies 4294892673 (age 428.192s) >

[GIT PULL] TEE fix for v5.10

2020-10-13 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small fix which reenables the kernel login method in the kernel internal TEE client API. This fixes a problem introduced in v5.8. Thanks, Jens The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: Linux 5.9-rc1 (2020-08-16

[GIT PULL] OP-TEE use UUID API for v5.10

2020-10-13 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch which allows to hide uuit_t internals from the OP-TEE driver. I know it's a bit late for v5.10, if it's too late please queue it for v5.11 instead. Thanks, Jens The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:

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

2020-10-12 Thread Jens Wiklander
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 > --- > drivers/tee/optee/call.c | 2 ++ > 1 file changed, 2 insertions(+) Would you mind giving a bit

Re: [PATCH v2] tee: add support for application-based session login methods

2020-10-01 Thread Jens Wiklander
On Wed, Sep 30, 2020 at 07:56:52PM +0300, Elvira Khabirova wrote: > GP TEE Client API in addition to login methods already supported > in the kernel also defines several application-based methods: > TEEC_LOGIN_APPLICATION, TEEC_LOGIN_USER_APPLICATION, and > TEEC_LOGIN_GROUP_APPLICATION. > > It

Re: [RFC PATCH] tee: add support for application-based session login methods

2020-09-30 Thread Jens Wiklander
On Wed, Sep 30, 2020 at 05:01:01AM +0300, Elvira Khabirova wrote: > On Mon, 28 Sep 2020 15:43:47 +0200 > Jens Wiklander wrote: > > > Hi Elvira, > > > > On Thu, Sep 17, 2020 at 06:38:03PM +0300, Elvira Khabirova wrote: > > > GP TEE Client API in additio

Re: [RFC PATCH] tee: add support for application-based session login methods

2020-09-28 Thread Jens Wiklander
Hi Elvira, On Thu, Sep 17, 2020 at 06:38:03PM +0300, Elvira Khabirova wrote: > GP TEE Client API in addition to login methods already supported > in the kernel also defines several application-based methods: > TEEC_LOGIN_APPLICATION, TEEC_LOGIN_USER_APPLICATION, and >

Re: [PATCH] tee: optee: replace might_sleep with cond_resched

2020-09-25 Thread Jens Wiklander
On Fri, Sep 18, 2020 at 7:45 PM Rouven Czerwinski wrote: > > On Kernels with CONFIG_PREEMPT_NONE might_sleep() is not enough to force > rescheduling, replace it with a resched check and cond_resched. Fixes > the following stall: > > [ 572.945146] rcu: INFO: rcu_sched self-detected stall on CPU

Re: [PATCH -next] tee: optee: fix type warning of sizeof in pool_op_alloc()

2020-09-24 Thread Jens Wiklander
On Thu, Sep 17, 2020 at 9:52 AM Liu Shixin wrote: > > sizeof() when applied to a pointer typed expression should gives the > size of the pointed data, even if the data is a pointer. > > Signed-off-by: Liu Shixin > --- > drivers/tee/optee/shm_pool.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH] drivers: optee: i2c: add bus retry configuration

2020-09-23 Thread Jens Wiklander
On Wed, Sep 23, 2020 at 01:26:31PM +0200, Jorge Ramirez-Ortiz, Foundries wrote: > On 23/09/20, Jorge Ramirez-Ortiz, Foundries wrote: > > On 22/09/20, Jens Wiklander wrote: > > > On Wed, Sep 16, 2020 at 05:27:32PM +0200, Jorge Ramirez-Ortiz wrote: > > > > Allo

Re: [PATCH] drivers: optee: i2c: add bus retry configuration

2020-09-22 Thread Jens Wiklander
On Wed, Sep 16, 2020 at 05:27:32PM +0200, Jorge Ramirez-Ortiz wrote: > Allow OP-TEE to specify the number of retries in the adaptor. > > Signed-off-by: Jorge Ramirez-Ortiz > --- > drivers/tee/optee/rpc.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/tee/optee/rpc.c

[GIT PULL] tee dev cleanup for v5.10

2020-09-18 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small cleanup in tee driver registration. There are no changes in behaviour, just a reduction in number of lines due to improved usage of the device driver framework. Thanks, Jens The following changes since commit

Re: [PATCH 1/2] tee: replace cdev_add + device_add with cdev_device_add

2020-09-18 Thread Jens Wiklander
On Tue, Sep 01, 2020 at 11:33:34AM +0100, Sudeep Holla wrote: > Commit 233ed09d7fda ("chardev: add helper function to register char devs > with a struct device") added a helper function 'cdev_device_add'. > > Make use of cdev_device_add in tee_device_register to replace cdev_add > and device_add.

Re: [PATCH] tee/tee_shm.c: Fix error handling path

2020-09-13 Thread Jens Wiklander
On Sun, Sep 13, 2020 at 10:12:11AM +0530, Souptick Joarder wrote: > When shm->num_pages <= 0, we should avoid calling > release_registered_pages() in error handling path. What are we fixing? > > Signed-off-by: Souptick Joarder > Cc: John Hubbard > --- > drivers/tee/tee_shm.c | 7 --- > 1

[GIT PULL] optee i2c fix for v5.10

2020-09-01 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch fixing a build issue in the previous OP-TEE I2C patch. The test IS_REACHABLE(CONFIG_I2C) is used instead of IS_ENABLED(CONFIG_I2C) to see if the I2C functions are available from the OP-TEE driver. If you rather have the patches squashed

Re: [PATCHv2] drivers: optee: fix i2c build issue

2020-09-01 Thread Jens Wiklander
On Mon, Aug 31, 2020 at 06:11:02PM +0200, Jorge Ramirez-Ortiz wrote: > When the optee driver is compiled into the kernel while the i2c core > is configured as a module, the i2c symbols are not available. > > This commit addresses the situation by disabling the i2c support for > this use case

[GIT PULL] tee subsystem pin_user_pages for v5.10

2020-08-25 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch converting the tee subsystem to use pin_user_pages() instead of get_user_pages(). Thanks, Jens The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) are available in the

Re: [PATCH v3] tee: convert convert get_user_pages() --> pin_user_pages()

2020-08-25 Thread Jens Wiklander
On Tue, Aug 25, 2020 at 10:54 AM John Hubbard wrote: > > On 8/25/20 1:32 AM, Jens Wiklander wrote: > > On Mon, Aug 24, 2020 at 02:11:25PM -0700, John Hubbard wrote: > ... > >> OK, one more try, this time actually handling the _USER_MAPPED vs. > >> _KERNEL_MAPPED p

Re: [PATCH v3] tee: convert convert get_user_pages() --> pin_user_pages()

2020-08-25 Thread Jens Wiklander
> There is some helpful background in [2]: basically, this is a small > part of fixing a long-standing disconnect between pinning pages, and > file systems' use of those pages. > > [1] Documentation/core-api/pin_user_pages.rst > > [2] "Explicit pinning of user-space page

Re: [GIT PULL] tee subsystem pin_user_pages for v5.8

2020-08-24 Thread Jens Wiklander
On Mon, Aug 24, 2020 at 9:18 AM John Hubbard wrote: > > On 8/23/20 11:51 PM, Jens Wiklander wrote: > > On Fri, Aug 21, 2020 at 11:19 PM Olof Johansson wrote: > >> > >> On Fri, Aug 21, 2020 at 12:58 PM John Hubbard wrote: > >>> > >>> On 8/21

Re: [GIT PULL] tee subsystem pin_user_pages for v5.8

2020-08-24 Thread Jens Wiklander
On Fri, Aug 21, 2020 at 11:19 PM Olof Johansson wrote: > > On Fri, Aug 21, 2020 at 12:58 PM John Hubbard wrote: > > > > On 8/21/20 11:49 AM, Olof Johansson wrote: > > > On Tue, May 26, 2020 at 03:12:59PM +0200, Jens Wiklander wrote: > > >> Hello arm-soc

[GIT PULL] tee memref null for v5.10

2020-08-21 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this patch enabling a TEE client to indicate a NULL pointer instead of a valid buffer when invoking a Trusted Application. Thanks, Jens The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: Linux 5.9-rc1 (2020-08-16 13:04:57

Re: [PATCH] driver: tee: Handle NULL pointer indication from client

2020-08-21 Thread Jens Wiklander
On Fri, Jul 10, 2020 at 12:18 PM Jens Wiklander wrote: > > From: Cedric Neveux > > TEE Client introduce a new capability "TEE_GEN_CAP_MEMREF_NULL" > to handle the support of the shared memory buffer with a NULL pointer. > > This capability depends on TEE Capabiliti

[GIT PULL] optee i2c for v5.10

2020-08-21 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this patch enabling i2c access from secure world via a trampoline in the OP-TEE driver. Thanks, Jens The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) are available in the Git

Re: [PATCHv9] drivers: optee: allow op-tee to access devices on the i2c bus

2020-08-21 Thread Jens Wiklander
On Fri, Aug 21, 2020 at 8:37 AM Jorge Ramirez-Ortiz, Foundries wrote: > > On 21/08/20, Jens Wiklander wrote: > > On Fri, Aug 14, 2020 at 01:12:21PM +0200, Jorge Ramirez-Ortiz wrote: > > > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to &g

Re: [PATCHv9] drivers: optee: allow op-tee to access devices on the i2c bus

2020-08-21 Thread Jens Wiklander
On Fri, Aug 14, 2020 at 01:12:21PM +0200, Jorge Ramirez-Ortiz wrote: > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > control this type of cryptographic devices it needs coordinated access > to the bus, so collisions and RUNTIME_PM dont get in the way. > > This trampoline

Re: [PATCHv8] drivers: optee: allow op-tee to access devices on the i2c bus

2020-08-13 Thread Jens Wiklander
On Wed, Aug 12, 2020 at 02:06:52PM +0200, Jorge Ramirez-Ortiz wrote: > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > control this type of cryptographic devices it needs coordinated access > to the bus, so collisions and RUNTIME_PM dont get in the way. > > This trampoline

Re: [PATCHv7] drivers: optee: allow op-tee to access devices on the i2c bus

2020-08-12 Thread Jens Wiklander
On Tue, Aug 11, 2020 at 07:55:31PM +0200, Jorge Ramirez-Ortiz wrote: > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > control this type of cryptographic devices it needs coordinated access > to the bus, so collisions and RUNTIME_PM dont get in the way. > > This trampoline

Re: [PATCHv6] drivers: optee: allow op-tee to access devices on the i2c bus

2020-08-05 Thread Jens Wiklander
On Wed, Aug 05, 2020 at 03:35:01PM +0200, Jorge Ramirez-Ortiz, Foundries wrote: > On 22/07/20, Jorge Ramirez-Ortiz wrote: > > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > > control this type of cryptographic devices it needs coordinated access > > to the bus, so

[PATCH] driver: tee: Handle NULL pointer indication from client

2020-07-10 Thread Jens Wiklander
Signed-off-by: Michael Whitfield Signed-off-by: Cedric Neveux Reviewed-by: Joakim Bech Tested-by: Joakim Bech (QEMU) Signed-off-by: Jens Wiklander --- drivers/tee/optee/core.c | 7 + drivers/tee/optee/optee_smc.h | 3 +++ drivers/tee/tee_core.c

[GIT PULL] optee bus for v5.9

2020-07-10 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull these patches enabling multi-stage OP-TEE bus enumeration and also adds a TPM driver for a OP-TEE based fTPM Trusted Application. The TPM driver depends on and takes advantage of the multi-stage OP-TEE bus enumeration by indicating that it should be probed

Re: [Tee-dev] [PATCHv8 1/3] optee: use uuid for sysfs driver entry

2020-06-29 Thread Jens Wiklander
On Fri, Jun 26, 2020 at 08:11:21AM -0700, James Bottomley wrote: > On Fri, 2020-06-26 at 12:29 +0100, Daniel Thompson wrote: > > On Fri, Jun 26, 2020 at 10:40:41AM +0530, Sumit Garg wrote: > > > On Fri, 26 Jun 2020 at 05:01, James Bottomley > > > wrote: > > > > > > > > On Thu, 2020-06-25 at

Re: [Tee-dev] [PATCHv8 1/3] optee: use uuid for sysfs driver entry

2020-06-24 Thread Jens Wiklander
On Fri, Jun 19, 2020 at 08:00:44AM -0700, James Bottomley wrote: > On Fri, 2020-06-19 at 13:42 +0530, Sumit Garg wrote: > > On Fri, 19 Jun 2020 at 00:49, James Bottomley > > wrote: > > > > > > On Thu, 2020-06-18 at 10:42 +0530, Sumit Garg wrote: > > > > On Thu, 18 Jun 2020 at 10:29, Sumit Garg

Re: [PATCHv8 0/3] optee: register drivers on optee bus

2020-06-18 Thread Jens Wiklander
On Wed, Jun 17, 2020 at 05:26:42PM +0300, Maxim Uvarov wrote: > On Tue, 16 Jun 2020 at 11:29, Jens Wiklander > wrote: > > > > Hi Maxim and Jarkko, > > > > On Mon, Jun 15, 2020 at 05:32:40PM +0300, Maxim Uvarov wrote: > > > ping. > > > Patchset was

Re: [PATCHv8 0/3] optee: register drivers on optee bus

2020-06-18 Thread Jens Wiklander
On Thu, Jun 18, 2020 at 02:37:55AM +0300, Jarkko Sakkinen wrote: > On Tue, Jun 16, 2020 at 10:29:07AM +0200, Jens Wiklander wrote: > > Hi Maxim and Jarkko, > > > > On Mon, Jun 15, 2020 at 05:32:40PM +0300, Maxim Uvarov wrote: > > > ping. > > > Patchset was

Re: [PATCHv8 0/3] optee: register drivers on optee bus

2020-06-16 Thread Jens Wiklander
pen() > > v4: - sysfs entry is optee-ta-uuid (Jerome Forissier, Sumit Garg) > > - added Documentation/ABI/testing/sysfs-bus-optee-devices (Greg > > Kroah-Hartman) > > v3: - support tee-suppicant restart (Jens Wiklander) > > - description and comments (Jark

[GIT PULL] update tee mailing list for v5.8

2020-06-16 Thread Jens Wiklander
the TEE mailing list in MAINTAINERS Jens Wiklander (1): MAINTAINERS: change tee mailing list MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH] MAINTAINERS: change tee mailing list

2020-06-15 Thread Jens Wiklander
The old TEE mailing list tee-...@lists.linaro.org is about to be retired. From now on please use op-...@lists.trustedfirmware.org instead. Signed-off-by: Jens Wiklander --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [RFC PATCH 0/3] firmware: Add support for PSA FF-A interface

2020-06-15 Thread Jens Wiklander
Hi, On Tue, Jun 09, 2020 at 06:41:23PM +0100, Sudeep Holla wrote: > (Sorry for the delay, got distracted with some other bug fix.) > > On Thu, Jun 04, 2020 at 02:37:46PM +0100, Will Deacon wrote: > > Hi Sudeep, [+Fuad, Andrew and Ard] > > > > (To other interested readers: if you haven't seen it,

Re: [Tee-dev] [PATCH v2] drivers: optee: allow op-tee to access devices on the i2c bus

2020-06-08 Thread Jens Wiklander
On Mon, Jun 01, 2020 at 09:24:46AM +0200, Jorge Ramirez-Ortiz, Foundries wrote: > On 01/06/20, Sumit Garg wrote: > > Hi Jorge, > > hey > > > > > On Mon, 1 Jun 2020 at 04:41, Jorge Ramirez-Ortiz wrote: > > > > > > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to > > >

Re: [PATCHv2 2/2] tpm_ftpm_tee: register driver on TEE bus

2020-05-28 Thread Jens Wiklander
On Thu, May 28, 2020 at 11:08:18AM +0300, Maxim Uvarov wrote: > On Wed, 27 May 2020 at 22:42, Jarkko Sakkinen > wrote: > > > > On Mon, 2020-05-25 at 09:50 +0300, Maxim Uvarov wrote: > > > Jakko, > > > tee-supplicant application provides state machine over callbacks with > > > RPC messages. > > >

Re: [PATCH] tee: fix crypto select

2020-05-27 Thread Jens Wiklander
Hi Arnd, On Wed, May 27, 2020 at 3:39 PM Arnd Bergmann wrote: > > When selecting a crypto cipher, we also need to select the > subsystem itself: > > WARNING: unmet direct dependencies detected for CRYPTO_SHA1 > Depends on [m]: CRYPTO [=m] > Selected by [y]: > - TEE [=y] && (HAVE_ARM_SMCCC

[GIT PULL] tee subsystem pin_user_pages for v5.8

2020-05-26 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small patch converting the tee subsystem to use pin_user_pages() instead of get_user_pages(). Thanks, Jens The following changes since commit ae83d0b416db002fe95601e7f97f64b59514d936: Linux 5.7-rc2 (2020-04-19 14:35:30 -0700) are available in the

Re: [PATCH v2] tee: convert get_user_pages() --> pin_user_pages()

2020-05-26 Thread Jens Wiklander
uot;Explicit pinning of user-space pages": > https://lwn.net/Articles/807108/ > > Cc: Jens Wiklander > Cc: Sumit Semwal > Cc: tee-...@lists.linaro.org > Cc: linux-me...@vger.kernel.org > Cc: dri-de...@lists.freedesktop.org > Cc: linaro-mm-...@lists.linaro.org >

Re: [PATCHv2 1/2] optee: do drivers initialization before and after tee-supplicant run

2020-05-24 Thread Jens Wiklander
Hi Maxim, On Thu, May 21, 2020 at 8:47 AM Maxim Uvarov wrote: > > Some drivers (like ftpm) can operate only after tee-supplicant > runs becase of tee-supplicant provides things like storage > services. This patch splits probe of non tee-supplicant dependable > drivers to early stage, and after

  1   2   3   4   5   >