Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From 9028b2463c1ea96f51c3ba53e2479346019ff6ad Mon Sep 17 00:00:00 2001 |
| 2 | From: Jens Wiklander <jens.wiklander@linaro.org> |
| 3 | Date: Thu, 25 Mar 2021 15:08:44 +0100 |
| 4 | Subject: [PATCH] tee: add sec_world_id to struct tee_shm |
| 5 | |
| 6 | Adds sec_world_id to struct tee_shm which describes a shared memory |
| 7 | object. sec_world_id can be used by a driver to store an id assigned by |
| 8 | secure world. |
| 9 | |
| 10 | Reviewed-by: Sumit Garg <sumit.garg@linaro.org> |
| 11 | Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 12 | |
| 13 | Upstream-Status: Submitted [https://github.com/torvalds/linux/commit/9028b2463c1ea96f51c3ba53e2479346019ff6ad] |
| 14 | Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> |
| 15 | |
| 16 | --- |
| 17 | include/linux/tee_drv.h | 7 ++++++- |
| 18 | 1 file changed, 6 insertions(+), 1 deletion(-) |
| 19 | |
| 20 | diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h |
| 21 | index 3ebfea0781f100..a1f03461369bd9 100644 |
| 22 | --- a/include/linux/tee_drv.h |
| 23 | +++ b/include/linux/tee_drv.h |
| 24 | @@ -197,7 +197,11 @@ int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method, |
| 25 | * @num_pages: number of locked pages |
| 26 | * @dmabuf: dmabuf used to for exporting to user space |
| 27 | * @flags: defined by TEE_SHM_* in tee_drv.h |
| 28 | - * @id: unique id of a shared memory object on this device |
| 29 | + * @id: unique id of a shared memory object on this device, shared |
| 30 | + * with user space |
| 31 | + * @sec_world_id: |
| 32 | + * secure world assigned id of this shared memory object, not |
| 33 | + * used by all drivers |
| 34 | * |
| 35 | * This pool is only supposed to be accessed directly from the TEE |
| 36 | * subsystem and from drivers that implements their own shm pool manager. |
| 37 | @@ -213,6 +217,7 @@ struct tee_shm { |
| 38 | struct dma_buf *dmabuf; |
| 39 | u32 flags; |
| 40 | int id; |
| 41 | + u64 sec_world_id; |
| 42 | }; |
| 43 | |
| 44 | /** |