File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ int optee_open_session(struct tee_context *ctx,
220
220
struct optee_msg_arg * msg_arg ;
221
221
phys_addr_t msg_parg ;
222
222
struct optee_session * sess = NULL ;
223
+ uuid_t client_uuid ;
223
224
224
225
/* +2 for the meta parameters added below */
225
226
shm = get_msg_arg (ctx , arg -> num_params + 2 , & msg_arg , & msg_parg );
@@ -240,10 +241,11 @@ int optee_open_session(struct tee_context *ctx,
240
241
memcpy (& msg_arg -> params [0 ].u .value , arg -> uuid , sizeof (arg -> uuid ));
241
242
msg_arg -> params [1 ].u .value .c = arg -> clnt_login ;
242
243
243
- rc = tee_session_calc_client_uuid (( uuid_t * ) & msg_arg -> params [ 1 ]. u . value ,
244
- arg -> clnt_login , arg -> clnt_uuid );
244
+ rc = tee_session_calc_client_uuid (& client_uuid , arg -> clnt_login ,
245
+ arg -> clnt_uuid );
245
246
if (rc )
246
247
goto out ;
248
+ export_uuid (msg_arg -> params [1 ].u .octets , & client_uuid );
247
249
248
250
rc = optee_to_msg_param (msg_arg -> params + 2 , arg -> num_params , param );
249
251
if (rc )
Original file line number Diff line number Diff line change 9
9
#include <linux/types.h>
10
10
11
11
/*
12
- * This file defines the OP-TEE message protocol used to communicate
12
+ * This file defines the OP-TEE message protocol (ABI) used to communicate
13
13
* with an instance of OP-TEE running in secure world.
14
14
*
15
15
* This file is divided into two sections.
@@ -144,9 +144,10 @@ struct optee_msg_param_value {
144
144
* @tmem: parameter by temporary memory reference
145
145
* @rmem: parameter by registered memory reference
146
146
* @value: parameter by opaque value
147
+ * @octets: parameter by octet string
147
148
*
148
149
* @attr & OPTEE_MSG_ATTR_TYPE_MASK indicates if tmem, rmem or value is used in
149
- * the union. OPTEE_MSG_ATTR_TYPE_VALUE_* indicates value,
150
+ * the union. OPTEE_MSG_ATTR_TYPE_VALUE_* indicates value or octets ,
150
151
* OPTEE_MSG_ATTR_TYPE_TMEM_* indicates @tmem and
151
152
* OPTEE_MSG_ATTR_TYPE_RMEM_* indicates @rmem,
152
153
* OPTEE_MSG_ATTR_TYPE_NONE indicates that none of the members are used.
@@ -157,6 +158,7 @@ struct optee_msg_param {
157
158
struct optee_msg_param_tmem tmem ;
158
159
struct optee_msg_param_rmem rmem ;
159
160
struct optee_msg_param_value value ;
161
+ u8 octets [24 ];
160
162
} u ;
161
163
};
162
164
You can’t perform that action at this time.
0 commit comments