[PATCH RFC 1/3] firmware: qcom: implement object invoke support

2024-07-03 Thread Amirreza Zarrabi
also provids simplified API which implements the Qualcomm TEE transport protocol. The implementation is independent from any services that may reside in nonsecure world. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/Kconfig | 14 + drivers/firmware/qcom/Makefile

[PATCH RFC 0/3] Implement Qualcomm TEE IPC and ioctl calls

2024-07-03 Thread Amirreza Zarrabi
RPMB, userspace clients or supplicants are implemented independently from the driver. We have a simple memory object and a user driver that uses qcom_tee_object. Signed-off-by: Amirreza Zarrabi --- Amirreza Zarrabi (3): firmware: qcom: implement object invoke support firmwa

[PATCH RFC 2/3] firmware: qcom: implement memory object support for TEE

2024-07-03 Thread Amirreza Zarrabi
later on added using separate extensions. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/Kconfig | 10 + drivers/firmware/qcom/qcom_object_invoke/Makefile | 5 + .../qcom/qcom_object_invoke/xts/mem_object.c | 406 + 3 files changed, 421

[PATCH RFC 3/3] firmware: qcom: implement ioctl for TEE object invocation

2024-07-03 Thread Amirreza Zarrabi
Provide ioctl to expose support to invoke a TEE object to userspace and implementing a callback server to handle TEE object invokes. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/Kconfig | 12 + drivers/firmware/qcom/qcom_object_invoke/Makefile |3

Re: [PATCH RFC 1/3] firmware: qcom: implement object invoke support

2024-07-03 Thread Amirreza Zarrabi
On 7/3/2024 10:13 PM, Dmitry Baryshkov wrote: > On Tue, Jul 02, 2024 at 10:57:36PM GMT, Amirreza Zarrabi wrote: >> Qualcomm TEE hosts Trusted Applications and Services that run in the >> secure world. Access to these resources is provided using object >> capabilities. A T

Re: [PATCH RFC 0/3] Implement Qualcomm TEE IPC and ioctl calls

2024-07-09 Thread Amirreza Zarrabi
On 7/3/2024 9:36 PM, Dmitry Baryshkov wrote: > On Tue, Jul 02, 2024 at 10:57:35PM GMT, Amirreza Zarrabi wrote: >> Qualcomm TEE hosts Trusted Applications (TAs) and services that run in >> the secure world. Access to these resources is provided using MinkIPC. >> MinkIPC

Re: [PATCH RFC 0/3] Implement Qualcomm TEE IPC and ioctl calls

2024-07-24 Thread Amirreza Zarrabi
On 7/18/2024 12:52 AM, Jens Wiklander wrote: > Hi, > > On Wed, Jul 10, 2024 at 1:17 AM Amirreza Zarrabi > wrote: >> >> >> >> On 7/3/2024 9:36 PM, Dmitry Baryshkov wrote: >>> On Tue, Jul 02, 2024 at 10:57:35PM GMT, Amirreza Zarrabi wrote: >>&

Re: [PATCH RFC 0/3] Implement Qualcomm TEE IPC and ioctl calls

2024-07-24 Thread Amirreza Zarrabi
On 7/17/2024 10:31 PM, Dmitry Baryshkov wrote: > Adding TEE mailing list and maintainers to the CC list. > > Amirreza, please include them in future even if you are not going to use > the framework. > Sure, Thanks Dmitry. > > On Wed, Jul 10, 2024 at 09:16:48AM GMT, A

Re: [PATCH RFC 1/3] firmware: qcom: implement object invoke support

2024-07-24 Thread Amirreza Zarrabi
On 7/4/2024 5:34 PM, Dmitry Baryshkov wrote: > On Thu, 4 Jul 2024 at 00:40, Amirreza Zarrabi > wrote: >> >> >> >> On 7/3/2024 10:13 PM, Dmitry Baryshkov wrote: >>> On Tue, Jul 02, 2024 at 10:57:36PM GMT, Amirreza Zarrabi wrote: >>>> Qualco

Re: [PATCH RFC 1/3] firmware: qcom: implement object invoke support

2024-07-24 Thread Amirreza Zarrabi
On 7/25/2024 2:09 PM, Dmitry Baryshkov wrote: > On Thu, Jul 25, 2024 at 01:19:07PM GMT, Amirreza Zarrabi wrote: >> >> >> On 7/4/2024 5:34 PM, Dmitry Baryshkov wrote: >>> On Thu, 4 Jul 2024 at 00:40, Amirreza Zarrabi >>> wrote: >>>> >>

[PATCH v3 11/11] Documentation: tee: Add Qualcomm TEE driver

2025-03-27 Thread Amirreza Zarrabi
Add documentation for the Qualcomm TEE driver. Signed-off-by: Amirreza Zarrabi --- Documentation/tee/index.rst | 1 + Documentation/tee/qtee.rst | 150 2 files changed, 151 insertions(+) diff --git a/Documentation/tee/index.rst b/Documentation

[PATCH v3 10/11] qcomtee: enable TEE_IOC_SHM_ALLOC ioctl

2025-03-27 Thread Amirreza Zarrabi
/OUTPUT. Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile | 1 + drivers/tee/qcomtee/call.c| 8 +- drivers/tee/qcomtee/mem_obj.c | 172 ++ drivers/tee/qcomtee/primordial_obj.c | 51 ++ drivers/tee/qcomtee

[PATCH v3 09/11] qcomtee: add primordial object

2025-03-27 Thread Amirreza Zarrabi
After booting, the kernel provides a static object known as the primordial object. This object is utilized by QTEE for native kernel services such as yield or privileged operations. Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile | 1 + drivers/tee/qcomtee/core.c

[PATCH v3 01/11] tee: allow a driver to allocate a tee_device without a pool

2025-03-27 Thread Amirreza Zarrabi
A TEE driver doesn't always need to provide a pool if it doesn't support memory sharing ioctls and can allocate memory for TEE messages in another way. Although this is mentioned in the documentation for tee_device_alloc(), it is not handled correctly. Signed-off-by: Amirre

[PATCH v3 02/11] tee: add close_context to TEE driver operation

2025-03-27 Thread Amirreza Zarrabi
, tee_device_get, and tee_device_get functions to tee_drv.h to make them accessible outside the TEE subsystem. Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c| 39 +++ drivers/tee/tee_private.h | 6 -- include/linux/tee_core.h | 11

[PATCH v3 07/11] firmware: qcom: tzmem: export shm_bridge create/delete

2025-03-27 Thread Amirreza Zarrabi
Anyone with access to contiguous physical memory should be able to share memory with QTEE using shm_bridge. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_tzmem.c | 57 +--- include/linux/firmware/qcom/qcom_tzmem.h | 15 + 2 files

[PATCH v3 00/11] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE)

2025-03-27 Thread Amirreza Zarrabi
and callback requests, including loading a TA and requesting services form the TA. Tested platforms: sm8650-mtp [1] https://www.kernel.org/doc/Documentation/tee.txt Signed-off-by: Amirreza Zarrabi Changes in v3: - Export shm_bridge create/delete APIs. - Enable support for QTEE memory objects

[PATCH v3 04/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF

2025-03-27 Thread Amirreza Zarrabi
invoke an object in userspace. Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 85 include/linux/tee_core.h | 4 +++ include/linux/tee_drv.h | 6 include/uapi/linux/tee.h | 41 +++ 4 files changed, 130

[PATCH v3 05/11] firmware: qcom: scm: add support for object invocation

2025-03-27 Thread Amirreza Zarrabi
-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 128 + drivers/firmware/qcom/qcom_scm.h | 7 ++ include/linux/firmware/qcom/qcom_scm.h | 27 +++ 3 files changed, 162 insertions(+) diff --git a/drivers/firmware/qcom/qcom_scm.c b

[PATCH v3 03/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-03-27 Thread Amirreza Zarrabi
: Amirreza Zarrabi --- drivers/tee/tee_core.c | 33 + include/linux/tee_drv.h | 6 ++ include/uapi/linux/tee.h | 22 -- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index

[PATCH v3 06/11] firmware: qcom: scm: remove unused arguments to the shm_brige

2025-03-27 Thread Amirreza Zarrabi
shm_bridge create/delete functions always use the scm device. There is no need to pass it as an argument. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 4 ++-- drivers/firmware/qcom/qcom_tzmem.c | 8 include/linux/firmware/qcom/qcom_scm.h | 4 ++-- 3

[PATCH v3 08/11] tee: add Qualcomm TEE driver

2025-03-27 Thread Amirreza Zarrabi
support for exporting qcomtee_object to userspace and QTEE, enabling the invocation of objects hosted in QTEE and userspace through the TEE subsystem. Signed-off-by: Amirreza Zarrabi --- drivers/tee/Kconfig| 1 + drivers/tee/Makefile | 1 + drivers/tee

Re: [PATCH v3 08/11] tee: add Qualcomm TEE driver

2025-04-08 Thread Amirreza Zarrabi
Hi Jens, On 4/8/2025 10:47 PM, Jens Wiklander wrote: > Hi Amirreza, > > On Fri, Mar 28, 2025 at 3:48 AM Amirreza Zarrabi > wrote: >> >> Introduce qcomtee_object, which represents an object in both QTEE and >> the kernel. QTEE clients can invoke an instance of qc

Re: [PATCH v3 03/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-04-09 Thread Amirreza Zarrabi
On 4/9/2025 4:41 PM, Jens Wiklander wrote: > Hi Amirreza, > > On Wed, Apr 9, 2025 at 2:28 AM Amirreza Zarrabi > wrote: >> >> Hi jens, >> >> On 4/8/2025 10:19 PM, Jens Wiklander wrote: >> >> Hi Amirreza, >> >> On Fri, Mar 28, 2025 a

Re: [PATCH v3 02/11] tee: add close_context to TEE driver operation

2025-04-08 Thread Amirreza Zarrabi
Hi Jens, On 4/8/2025 12:55 AM, Jens Wiklander wrote: > Hi Amir, > > On Fri, Mar 28, 2025 at 3:48 AM Amirreza Zarrabi > wrote: >> The tee_context can be used to manage TEE user resources, including >> those allocated by the driver for the TEE on behalf of the user. >

Re: [PATCH v3 03/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-04-08 Thread Amirreza Zarrabi
Hi jens, On 4/8/2025 10:19 PM, Jens Wiklander wrote: > Hi Amirreza, > > On Fri, Mar 28, 2025 at 3:48 AM Amirreza Zarrabi > wrote: >> For drivers that can transfer data to the TEE without using shared >> memory from client, it is necessary to receive the user address &g

Re: [PATCH v3 02/11] tee: add close_context to TEE driver operation

2025-04-27 Thread Amirreza Zarrabi
Hi Sumit On 4/21/2025 8:42 PM, Sumit Garg wrote: > On Thu, Mar 27, 2025 at 07:47:24PM -0700, Amirreza Zarrabi wrote: >> The tee_context can be used to manage TEE user resources, including >> those allocated by the driver for the TEE on behalf of the user. >> The release() cal

Re: [PATCH v3 04/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF

2025-04-27 Thread Amirreza Zarrabi
Hi Sumit, On 4/21/2025 11:38 PM, Sumit Garg wrote: > On Thu, Mar 27, 2025 at 07:47:26PM -0700, Amirreza Zarrabi wrote: >> The TEE subsystem allows session-based access to trusted services, >> requiring a session to be established to receive a service. This >> is not suitab

Re: [PATCH v3 03/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-04-27 Thread Amirreza Zarrabi
Hi Sumit, On 4/21/2025 11:17 PM, Sumit Garg wrote: > On Wed, Apr 09, 2025 at 05:20:08PM +1000, Amirreza Zarrabi wrote: >> >> >> On 4/9/2025 4:41 PM, Jens Wiklander wrote: >>> Hi Amirreza, >>> >>> On Wed, Apr 9, 2025 at 2:28 AM Amirreza Zarrabi >

Re: [PATCH v3 00/11] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE)

2025-04-10 Thread Amirreza Zarrabi
On 4/9/2025 6:30 PM, neil.armstr...@linaro.org wrote: > On 28/03/2025 03:47, Amirreza Zarrabi wrote: >> This patch series introduces a Trusted Execution Environment (TEE) >> driver for Qualcomm TEE (QTEE). QTEE enables Trusted Applications (TAs) >> and services to run

Re: [PATCH v4 00/11] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE)

2025-04-30 Thread Amirreza Zarrabi
Hi Neil, On 4/29/2025 11:01 PM, neil.armstr...@linaro.org wrote: > On 29/04/2025 08:06, Amirreza Zarrabi wrote: >> This patch series introduces a Trusted Execution Environment (TEE) >> driver for Qualcomm TEE (QTEE). QTEE enables Trusted Applications (TAs) >> and services to

Re: [PATCH v4 06/11] firmware: qcom: scm: remove unused arguments to the shm_brige

2025-05-05 Thread Amirreza Zarrabi
On 5/5/2025 8:58 PM, Kuldeep Singh wrote: > > > On 4/29/2025 11:36 AM, Amirreza Zarrabi wrote: >> shm_bridge create/delete functions always use the scm device. >> There is no need to pass it as an argument. >> >> Signed-off-by: Amirreza Zarrabi > >

[PATCH v4 03/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-04-28 Thread Amirreza Zarrabi
: Amirreza Zarrabi --- drivers/tee/tee_core.c | 33 + include/linux/tee_drv.h | 6 ++ include/uapi/linux/tee.h | 22 -- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index

[PATCH v4 05/11] firmware: qcom: scm: add support for object invocation

2025-04-28 Thread Amirreza Zarrabi
-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 128 + drivers/firmware/qcom/qcom_scm.h | 7 ++ include/linux/firmware/qcom/qcom_scm.h | 27 +++ 3 files changed, 162 insertions(+) diff --git a/drivers/firmware/qcom/qcom_scm.c b

[PATCH v4 02/11] tee: add close_context to TEE driver operation

2025-04-28 Thread Amirreza Zarrabi
, tee_device_get, and tee_device_get functions to tee_core.h to make them accessible outside the TEE subsystem. Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c| 7 +++ drivers/tee/tee_private.h | 6 -- include/linux/tee_core.h | 50 +-- 3

[PATCH v4 04/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF

2025-04-28 Thread Amirreza Zarrabi
invoke an object in userspace. Reviewed-by: Sumit Garg Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 85 include/linux/tee_core.h | 4 +++ include/linux/tee_drv.h | 6 include/uapi/linux/tee.h | 41

[PATCH v4 00/11] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE)

2025-04-28 Thread Amirreza Zarrabi
and callback requests, including loading a TA and requesting services form the TA. Tested platforms: sm8650-mtp [1] https://www.kernel.org/doc/Documentation/tee.txt Signed-off-by: Amirreza Zarrabi Changes in v4: - Move teedev_ctx_get/put and tee_device_get/put to tee_core.h. - Rename object to

[PATCH v4 01/11] tee: allow a driver to allocate a tee_device without a pool

2025-04-28 Thread Amirreza Zarrabi
ned-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index d113679b1e2d..24edce4cdbaa 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -888,7 +888,7 @@ struct

[PATCH v4 06/11] firmware: qcom: scm: remove unused arguments to the shm_brige

2025-04-28 Thread Amirreza Zarrabi
shm_bridge create/delete functions always use the scm device. There is no need to pass it as an argument. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 4 ++-- drivers/firmware/qcom/qcom_tzmem.c | 8 include/linux/firmware/qcom/qcom_scm.h | 4 ++-- 3

[PATCH v4 08/11] tee: add Qualcomm TEE driver

2025-04-28 Thread Amirreza Zarrabi
support for exporting qcomtee_object to userspace and QTEE, enabling the invocation of objects hosted in QTEE and userspace through the TEE subsystem. Signed-off-by: Amirreza Zarrabi --- MAINTAINERS| 7 + drivers/tee/Kconfig| 1 + drivers/tee

[PATCH v4 10/11] qcomtee: enable TEE_IOC_SHM_ALLOC ioctl

2025-04-28 Thread Amirreza Zarrabi
/OUTPUT. Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile | 1 + drivers/tee/qcomtee/call.c| 10 +- drivers/tee/qcomtee/mem_obj.c | 172 ++ drivers/tee/qcomtee/primordial_obj.c | 50 ++ drivers/tee/qcomtee

[PATCH v4 11/11] Documentation: tee: Add Qualcomm TEE driver

2025-04-28 Thread Amirreza Zarrabi
Add documentation for the Qualcomm TEE driver. Signed-off-by: Amirreza Zarrabi --- Documentation/tee/index.rst | 1 + Documentation/tee/qtee.rst | 150 MAINTAINERS | 1 + 3 files changed, 152 insertions(+) diff --git a

[PATCH v4 07/11] firmware: qcom: tzmem: export shm_bridge create/delete

2025-04-28 Thread Amirreza Zarrabi
Anyone with access to contiguous physical memory should be able to share memory with QTEE using shm_bridge. Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_tzmem.c | 57 +--- include/linux/firmware/qcom/qcom_tzmem.h | 15 + 2 files

[PATCH v4 09/11] qcomtee: add primordial object

2025-04-28 Thread Amirreza Zarrabi
After booting, the kernel provides a static object known as the primordial object. This object is utilized by QTEE for native kernel services such as yield or privileged operations. Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile | 1 + drivers/tee/qcomtee/core.c

[PATCH v5 03/12] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-05-26 Thread Amirreza Zarrabi
: Sumit Garg Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 33 + include/linux/tee_drv.h | 6 ++ include/uapi/linux/tee.h | 22 -- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a

[PATCH v5 12/12] Documentation: tee: Add Qualcomm TEE driver

2025-05-26 Thread Amirreza Zarrabi
Add documentation for the Qualcomm TEE driver. Signed-off-by: Amirreza Zarrabi --- Documentation/tee/index.rst | 1 + Documentation/tee/qtee.rst | 150 MAINTAINERS | 1 + 3 files changed, 152 insertions(+) diff --git a

[PATCH v5 09/12] tee: add Qualcomm TEE driver

2025-05-26 Thread Amirreza Zarrabi
: Amirreza Zarrabi --- MAINTAINERS | 7 + drivers/tee/Kconfig | 1 + drivers/tee/Makefile | 1 + drivers/tee/qcomtee/Kconfig | 11 + drivers/tee/qcomtee/Makefile | 7 + drivers/tee/qcomtee/async.c | 183

[PATCH v5 00/12] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE)

2025-05-26 Thread Amirreza Zarrabi
and callback requests, including loading a TA and requesting services form the TA. Tested platforms: sm8650-mtp, sm8550-qrd, sm8650-qrd, sm8650-hdk [1] https://www.kernel.org/doc/Documentation/tee.txt Signed-off-by: Amirreza Zarrabi Changes in v5: - Remove references to kernel services and

[PATCH v5 04/12] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF

2025-05-26 Thread Amirreza Zarrabi
invoke an object in userspace. Reviewed-by: Sumit Garg Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 85 include/linux/tee_core.h | 4 +++ include/linux/tee_drv.h | 6 include/uapi/linux/tee.h

[PATCH v5 06/12] firmware: qcom: scm: add support for object invocation

2025-05-26 Thread Amirreza Zarrabi
-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 128 + drivers/firmware/qcom/qcom_scm.h | 7 ++ include/linux/firmware/qcom/qcom_scm.h | 6 ++ 3 files changed, 141 insertions(+) diff --git a/drivers/firmware

[PATCH v5 01/12] tee: allow a driver to allocate a tee_device without a pool

2025-05-26 Thread Amirreza Zarrabi
ned-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index acc7998758ad..133447f25065 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -889,7 +889,7 @@ struct

[PATCH v5 05/12] tee: increase TEE_MAX_ARG_SIZE to 4096

2025-05-26 Thread Amirreza Zarrabi
Increase TEE_MAX_ARG_SIZE to accommodate worst-case scenarios where additional buffer space is required to pass all arguments to TEE. This change is necessary for upcoming support for Qualcomm TEE, which requires a larger buffer for argument marshaling. Signed-off-by: Amirreza Zarrabi

[PATCH v5 02/12] tee: add close_context to TEE driver operation

2025-05-26 Thread Amirreza Zarrabi
, tee_device_get, and tee_device_get functions to tee_core.h to make them accessible outside the TEE subsystem. Reviewed-by: Sumit Garg Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c| 7 +++ drivers/tee/tee_private.h | 6 -- include/linux/tee_core.h

[PATCH v5 07/12] firmware: qcom: scm: remove unused arguments to the shm_brige

2025-05-26 Thread Amirreza Zarrabi
shm_bridge create/delete functions always use the scm device. There is no need to pass it as an argument. Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 4 ++-- drivers/firmware/qcom/qcom_tzmem.c | 8 include/linux/firmware

[PATCH v5 10/12] qcomtee: add primordial object

2025-05-26 Thread Amirreza Zarrabi
After booting, the kernel provides a static object known as the primordial object. This object is utilized by QTEE for native kernel services such as yield or privileged operations. Acked-by: Sumit Garg Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile

[PATCH v5 11/12] qcomtee: enable TEE_IOC_SHM_ALLOC ioctl

2025-05-26 Thread Amirreza Zarrabi
/OUTPUT. Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile | 1 + drivers/tee/qcomtee/call.c | 10 +- drivers/tee/qcomtee/mem_obj.c| 172 +++ drivers/tee/qcomtee/primordial_obj.c | 50

[PATCH v5 08/12] firmware: qcom: tzmem: export shm_bridge create/delete

2025-05-26 Thread Amirreza Zarrabi
Anyone with access to contiguous physical memory should be able to share memory with QTEE using shm_bridge. Tested-by: Neil Armstrong Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_tzmem.c | 57 +--- include/linux/firmware/qcom/qcom_tzmem.h

Re: [PATCH v4 08/11] tee: add Qualcomm TEE driver

2025-05-26 Thread Amirreza Zarrabi
Hi Sumit, On 5/14/2025 11:25 PM, Sumit Garg wrote: > Hi Amir, > > Apologies for getting to this patch review a bit late, mostly due to > it's enormous size. > Thank you so much for the review. > On Mon, Apr 28, 2025 at 11:06:29PM -0700, Amirreza Zarrabi wrote: >

Re: [PATCH v10 7/9] optee: support protected memory allocation

2025-06-24 Thread Amirreza Zarrabi
Hi Jens, On 6/10/2025 11:13 PM, Jens Wiklander wrote: > Add support in the OP-TEE backend driver for protected memory > allocation. The support is limited to only the SMC ABI and for secure > video buffers. > > OP-TEE is probed for the range of protected physical memory and a > memory pool alloca

Re: [PATCH v9 3/9] tee: implement protected DMA-heap

2025-05-29 Thread Amirreza Zarrabi
Hi Jens, On 5/21/2025 1:16 AM, Jens Wiklander wrote: > Implement DMA heap for protected DMA-buf allocation in the TEE > subsystem. > > Restricted memory refers to memory buffers behind a hardware enforced > firewall. It is not accessible to the kernel during normal circumstances > but rather only

Re: [PATCH v5 03/12] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-06-11 Thread Amirreza Zarrabi
Hi Andrew, On 6/12/2025 8:40 AM, Andrew Davis wrote: > On 5/27/25 1:56 AM, Amirreza Zarrabi wrote: >> For drivers that can transfer data to the TEE without using shared >> memory from client, it is necessary to receive the user address >> directly, bypassing any processing

[PATCH v6 04/12] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF

2025-07-13 Thread Amirreza Zarrabi
invoke an object in userspace. Reviewed-by: Sumit Garg Tested-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 85 include/linux/tee_core.h | 4 +++ include/linux/tee_drv.h | 6

[PATCH v6 03/12] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF

2025-07-13 Thread Amirreza Zarrabi
: Sumit Garg Tested-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 33 + include/linux/tee_drv.h | 6 ++ include/uapi/linux/tee.h | 22 -- 3 files changed, 55 insertions(+), 6 deletions

[PATCH v6 06/12] firmware: qcom: scm: add support for object invocation

2025-07-13 Thread Amirreza Zarrabi
-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 128 + drivers/firmware/qcom/qcom_scm.h | 7 ++ include/linux/firmware/qcom/qcom_scm.h | 6 ++ 3 files changed, 141 insertions(+) diff

[PATCH v6 05/12] tee: increase TEE_MAX_ARG_SIZE to 4096

2025-07-13 Thread Amirreza Zarrabi
Dev Signed-off-by: Amirreza Zarrabi --- include/uapi/linux/tee.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h index 441d97add53f..71a365afb89b 100644 --- a/include/uapi/linux/tee.h +++ b/include/uapi/linux/tee.h @@ -42,7

[PATCH v6 11/12] qcomtee: enable TEE_IOC_SHM_ALLOC ioctl

2025-07-13 Thread Amirreza Zarrabi
/OUTPUT. Tested-by: Neil Armstrong Acked-by: Sumit Garg Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/tee/qcomtee/Makefile | 1 + drivers/tee/qcomtee/call.c | 9 +- drivers/tee/qcomtee/mem_obj.c| 169 +++ drivers

[PATCH v6 00/12] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE)

2025-07-13 Thread Amirreza Zarrabi
tion/tee.txt Signed-off-by: Amirreza Zarrabi Changes in v6: - Relocate QTEE version into the driver's main service structure. - Simplfies qcomtee_objref_to_arg() and qcomtee_objref_from_arg(). - Enhanced the return logic of qcomtee_object_do_invoke_internal(). - Improve comments and remove

[PATCH v6 01/12] tee: allow a driver to allocate a tee_device without a pool

2025-07-13 Thread Amirreza Zarrabi
ned-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index acc7998758ad..133447f25065 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -889,7 +889,7 @@ struct

[PATCH v6 02/12] tee: add close_context to TEE driver operation

2025-07-13 Thread Amirreza Zarrabi
, tee_device_get, and tee_device_get functions to tee_core.h to make them accessible outside the TEE subsystem. Reviewed-by: Sumit Garg Tested-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/tee/tee_core.c| 7 +++ drivers/tee/tee_private.h | 6

[PATCH v6 07/12] firmware: qcom: scm: remove unused arguments to the shm_brige

2025-07-13 Thread Amirreza Zarrabi
shm_bridge create/delete functions always use the scm device. There is no need to pass it as an argument. Tested-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_scm.c | 4 ++-- drivers/firmware/qcom/qcom_tzmem.c | 8

[PATCH v6 08/12] firmware: qcom: tzmem: export shm_bridge create/delete

2025-07-13 Thread Amirreza Zarrabi
Anyone with access to contiguous physical memory should be able to share memory with QTEE using shm_bridge. Tested-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi --- drivers/firmware/qcom/qcom_tzmem.c | 62 ++-- include/linux

[PATCH v6 10/12] qcomtee: add primordial object

2025-07-13 Thread Amirreza Zarrabi
After booting, the kernel provides a static object known as the primordial object. This object is utilized by QTEE for native kernel services such as yield or privileged operations. Acked-by: Sumit Garg Tested-by: Neil Armstrong Tested-by: Harshal Dev Signed-off-by: Amirreza Zarrabi

[PATCH v6 09/12] tee: add Qualcomm TEE driver

2025-07-13 Thread Amirreza Zarrabi
Signed-off-by: Amirreza Zarrabi --- MAINTAINERS | 6 + drivers/tee/Kconfig | 1 + drivers/tee/Makefile | 1 + drivers/tee/qcomtee/Kconfig | 11 + drivers/tee/qcomtee/Makefile | 7 + drivers/tee/qcomtee/async.c

[PATCH v6 12/12] Documentation: tee: Add Qualcomm TEE driver

2025-07-13 Thread Amirreza Zarrabi
Add documentation for the Qualcomm TEE driver. Signed-off-by: Amirreza Zarrabi --- Documentation/tee/index.rst | 1 + Documentation/tee/qtee.rst | 96 + MAINTAINERS | 1 + 3 files changed, 98 insertions(+) diff --git a

Re: [PATCH v5 08/12] firmware: qcom: tzmem: export shm_bridge create/delete

2025-07-07 Thread Amirreza Zarrabi
Hi Kuldeep, On 7/1/2025 9:47 PM, Kuldeep Singh wrote: > > On 5/27/2025 12:26 PM, Amirreza Zarrabi wrote: >> Anyone with access to contiguous physical memory should be able to >> share memory with QTEE using shm_bridge. >> >> Tested-by: Neil Armstrong >

Re: [PATCH v5 12/12] Documentation: tee: Add Qualcomm TEE driver

2025-07-10 Thread Amirreza Zarrabi
Hi Sumit, On 7/7/2025 10:19 PM, Sumit Garg wrote: > On Mon, May 26, 2025 at 11:56:57PM -0700, Amirreza Zarrabi wrote: >> Add documentation for the Qualcomm TEE driver. >> >> Signed-off-by: Amirreza Zarrabi >> --- >> Documentation/tee/index.rst | 1 + >

Re: [PATCH v5 09/12] tee: add Qualcomm TEE driver

2025-07-11 Thread Amirreza Zarrabi
Hi Sumit, Thank you so much for the comments. Sorry for the large patch. On 7/7/2025 10:09 PM, Sumit Garg wrote: > Hi Amir, > > On Mon, May 26, 2025 at 11:56:54PM -0700, Amirreza Zarrabi wrote: >> Introduce qcomtee_object, which represents an object in both QTEE and >> the

Re: [PATCH v6 09/12] tee: add Qualcomm TEE driver

2025-07-23 Thread Amirreza Zarrabi
Hi Sumit, On 7/21/2025 8:40 PM, Sumit Garg wrote: > On Sun, Jul 13, 2025 at 05:49:21PM -0700, Amirreza Zarrabi wrote: >> Introduce qcomtee_object, which represents an object in both QTEE and >> the kernel. QTEE clients can invoke an instance of qcomtee_object to >> access Q