Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 a45ea4efa358. Lets drop these flags before
someone does try to use them for something and they become ABI.

Signed-off-by: Andrew Davis <afd@ti.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

authored by

Andrew Davis and committed by
Jens Wiklander
d8fc1c7c 66eb6df7

-6
-2
drivers/tee/tee_core.c
··· 302 302 return PTR_ERR(shm); 303 303 304 304 data.id = shm->id; 305 - data.flags = shm->flags; 306 305 data.size = shm->size; 307 306 308 307 if (copy_to_user(udata, &data, sizeof(data))) ··· 338 339 return PTR_ERR(shm); 339 340 340 341 data.id = shm->id; 341 - data.flags = shm->flags; 342 342 data.length = shm->size; 343 343 344 344 if (copy_to_user(udata, &data, sizeof(data)))
-4
include/uapi/linux/tee.h
··· 42 42 #define TEE_IOC_MAGIC 0xa4 43 43 #define TEE_IOC_BASE 0 44 44 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 - 49 45 #define TEE_MAX_ARG_SIZE 1024 50 46 51 47 #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */