Skip to content

Commit d8fc1c7

Browse files
glneojenswi-linaro
authored andcommitted
tee: remove flags TEE_IOCTL_SHM_MAPPED and TEE_IOCTL_SHM_DMA_BUF
These look to be leftover from an early edition of this driver. Userspace does not need this information. Checking all users of this that I have access to I have verified no one is using them. They leak internal use flags out to userspace. Even more they are not correct anymore after a45ea4e. Lets drop these flags before someone does try to use them for something and they become ABI. Signed-off-by: Andrew Davis <[email protected]> Acked-by: Sumit Garg <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent 66eb6df commit d8fc1c7

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

drivers/tee/tee_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ static int tee_ioctl_shm_alloc(struct tee_context *ctx,
302302
return PTR_ERR(shm);
303303

304304
data.id = shm->id;
305-
data.flags = shm->flags;
306305
data.size = shm->size;
307306

308307
if (copy_to_user(udata, &data, sizeof(data)))
@@ -339,7 +338,6 @@ tee_ioctl_shm_register(struct tee_context *ctx,
339338
return PTR_ERR(shm);
340339

341340
data.id = shm->id;
342-
data.flags = shm->flags;
343341
data.length = shm->size;
344342

345343
if (copy_to_user(udata, &data, sizeof(data)))

include/uapi/linux/tee.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
#define TEE_IOC_MAGIC 0xa4
4343
#define TEE_IOC_BASE 0
4444

45-
/* Flags relating to shared memory */
46-
#define TEE_IOCTL_SHM_MAPPED 0x1 /* memory mapped in normal world */
47-
#define TEE_IOCTL_SHM_DMA_BUF 0x2 /* dma-buf handle on shared memory */
48-
4945
#define TEE_MAX_ARG_SIZE 1024
5046

5147
#define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */

0 commit comments

Comments
 (0)