There are use-cases where user-space shouldn't be allowed to communicate directly with a TEE device which is dedicated to provide a specific service for a kernel client. So add a private login method for kernel clients and disallow user-space to open-session using GP implementation defined login method range: (0x80000000 - 0xBFFFFFFF).
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -173,6 +173,15 @@ struct tee_ioctl_buf_data { · 172 unmodified lines | |||
| 173 | #define TEE_IOCTL_LOGIN_APPLICATION 4 | 173 | #define TEE_IOCTL_LOGIN_APPLICATION 4 |
| 174 | #define TEE_IOCTL_LOGIN_USER_APPLICATION 5 | 174 | #define TEE_IOCTL_LOGIN_USER_APPLICATION 5 |
| 175 | #define TEE_IOCTL_LOGIN_GROUP_APPLICATION 6 | 175 | #define TEE_IOCTL_LOGIN_GROUP_APPLICATION 6 |
| 176 | /* | ||
| 177 | * Disallow user-space to use GP implementation specific login | ||
| 178 | * method range (0x80000000 - 0xBFFFFFFF). This range is rather | ||
| 179 | * being reserved for REE kernel clients or TEE implementation. | ||
| 180 | */ | ||
| 181 | #define TEE_IOCTL_LOGIN_REE_KERNEL_MIN 0x80000000 | ||
| 182 | #define TEE_IOCTL_LOGIN_REE_KERNEL_MAX 0xBFFFFFFF | ||
| 183 | /* Private login method for REE kernel clients */ | ||
| 184 | #define TEE_IOCTL_LOGIN_REE_KERNEL 0x80000000 | ||
| 176 | 185 | ||
| 177 | /** | 186 | /** |
| 178 | * struct tee_ioctl_param - parameter | 187 | * struct tee_ioctl_param - parameter |