Skip to content

Commit c5b4312

Browse files
vesajaaskelainenjenswi-linaro
authored andcommitted
tee: optee: Add support for session login client UUID generation
Adds support for client UUID generation for OP-TEE. For group based session logins membership is verified. Signed-off-by: Vesa Jääskeläinen <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent e33bcba commit c5b4312

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/tee/optee/call.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,13 @@ int optee_open_session(struct tee_context *ctx,
233233
msg_arg->params[1].attr = OPTEE_MSG_ATTR_TYPE_VALUE_INPUT |
234234
OPTEE_MSG_ATTR_META;
235235
memcpy(&msg_arg->params[0].u.value, arg->uuid, sizeof(arg->uuid));
236-
memcpy(&msg_arg->params[1].u.value, arg->uuid, sizeof(arg->clnt_uuid));
237236
msg_arg->params[1].u.value.c = arg->clnt_login;
238237

238+
rc = tee_session_calc_client_uuid((uuid_t *)&msg_arg->params[1].u.value,
239+
arg->clnt_login, arg->clnt_uuid);
240+
if (rc)
241+
goto out;
242+
239243
rc = optee_to_msg_param(msg_arg->params + 2, arg->num_params, param);
240244
if (rc)
241245
goto out;

0 commit comments

Comments
 (0)