tee: system session
authorEtienne Carriere <etienne.carriere@foss.st.com>
Mon, 30 Oct 2023 08:48:10 +0000 (09:48 +0100)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 17 Nov 2023 14:48:03 +0000 (15:48 +0100)
commita9214a8883ceb82df55aa90d1c49ddb85fc1e3d5
tree9ab8c6ba9404ef07f2e82b89216e198fafea8a9f
parent077798da028e81ada39a256969207c91db66ebaf
tee: system session

Adds kernel client API function tee_client_system_session() for a client
to request a system service entry in TEE context.

This feature is needed to prevent a system deadlock when several TEE
client applications invoke TEE, consuming all TEE thread contexts
available in the secure world. The deadlock can happen in the OP-TEE
driver for example if all these TEE threads issue an RPC call from TEE
to Linux OS to access an eMMC RPMB partition (TEE secure storage) which
device clock or regulator controller is accessed through an OP-TEE SCMI
services. In that case, Linux SCMI driver must reach OP-TEE SCMI service
without waiting until one of the consumed TEE threads is freed.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Co-developed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/tee_core.c
include/linux/tee_drv.h