linux-uconsole/drivers/tee/optee
Jerome Forissier 9584ce366c tee: optee: do not check memref size on return from Secure World
[ Upstream commit c650b8dc7a ]

When Secure World returns, it may have changed the size attribute of the
memory references passed as [in/out] parameters. The GlobalPlatform TEE
Internal Core API specification does not restrict the values that this
size can take. In particular, Secure World may increase the value to be
larger than the size of the input buffer to indicate that it needs more.

Therefore, the size check 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_CORE_DYN_SHM=n).

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:47:18 +02:00
..
call.c tee: optee: replace might_sleep with cond_resched 2021-02-03 23:28:43 +01:00
core.c tee: optee: do not check memref size on return from Secure World 2021-05-11 14:47:18 +02:00
device.c optee: enable support for multi-stage bus enumeration 2020-07-10 09:41:53 +02:00
Kconfig tee: optee: Fix compilation issue with nommu 2020-01-23 10:55:20 +01:00
Makefile tee: optee: add TEE bus device enumeration support 2019-02-01 15:12:46 +01:00
optee_msg.h drivers: optee: allow op-tee to access devices on the i2c bus 2020-08-21 11:41:45 +02:00
optee_private.h drivers: optee: allow op-tee to access devices on the i2c bus 2020-08-21 11:41:45 +02:00
optee_smc.h driver: tee: Handle NULL pointer indication from client 2020-08-21 08:55:13 +02:00
rpc.c optee: simplify i2c access 2021-03-04 11:37:28 +01:00
shm_pool.c optee: Fix multi page dynamic shm pool alloc 2020-01-03 11:21:12 +01:00
shm_pool.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
supp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00