Adds utility function in TEE subsystem for client UUID generation. This function is also used in the optee driver. * tag 'tee-login-for-5.8' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: Add support for session login client UUID generation tee: add support for session's client UUID generation
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -166,6 +166,22 @@ int tee_device_register(struct tee_device *teedev); · 165 unmodified lines | ||
| 166 | 166 | */ |
| 167 | 167 | void tee_device_unregister(struct tee_device *teedev); |
| 168 | 168 | |
| 169 | +/** | |
| 170 | + * tee_session_calc_client_uuid() - Calculates client UUID for session | |
| 171 | + * @uuid: Resulting UUID | |
| 172 | + * @connection_method: Connection method for session (TEE_IOCTL_LOGIN_*) | |
| 173 | + * @connectuon_data: Connection data for opening session | |
| 174 | + * | |
| 175 | + * Based on connection method calculates UUIDv5 based client UUID. | |
| 176 | + * | |
| 177 | + * For group based logins verifies that calling process has specified | |
| 178 | + * credentials. | |
| 179 | + * | |
| 180 | + * @return < 0 on failure | |
| 181 | + */ | |
| 182 | +int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method, | |
| 183 | + const u8 connection_data[TEE_IOCTL_UUID_LEN]); | |
| 184 | + | |
| 169 | 185 | /** |
| 170 | 186 | * struct tee_shm - shared memory object |
| 171 | 187 | * @ctx: context using the object |