Skip to content

Commit

Permalink
core: arm: stmm_sp: fix calls to tee_pobj_get()
Browse files Browse the repository at this point in the history
Fixes calls to tee_pobj_get() that use boolean value false as argument
where an enum tee_pobj_usage argument is expected.

Between OP-TEE release tags 2.4.0 and 3.11.0, tee_pobj_get() used to
take a boolean @temporary argument. The function prototype changed in
commit 6885abf ("core: tee_pobj_get() takes an enum tee_pobj_usage")
and was merged in release tag 3.11.0 but initial implementation of StMM
support [1] and its related source file renaming [2] sadly used the
old prototype, using false (0) instead of TEE_POBJ_USAGE_OPEN (0).

Fixes: 42471ec ("core: load stmm via secure partition") [1]
Fixes: f9cd31c ("core: rename secure_partition to stmm_sp") [2]
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
etienne-lms authored and jforissier committed Nov 9, 2023
1 parent 49d026a commit d0989b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/arch/arm/kernel/stmm_sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ static TEE_Result sec_storage_obj_read(unsigned long storage_id, char *obj_id,
sess = ts_get_current_session();

res = tee_pobj_get(&sess->ctx->uuid, obj_id, obj_id_len, flags,
false, fops, &po);
TEE_POBJ_USAGE_OPEN, fops, &po);
if (res != TEE_SUCCESS)
return res;

Expand Down Expand Up @@ -714,7 +714,7 @@ static TEE_Result sec_storage_obj_write(unsigned long storage_id, char *obj_id,
sess = ts_get_current_session();

res = tee_pobj_get(&sess->ctx->uuid, obj_id, obj_id_len, flags,
false, fops, &po);
TEE_POBJ_USAGE_OPEN, fops, &po);
if (res != TEE_SUCCESS)
return res;

Expand Down

0 comments on commit d0989b4

Please sign in to comment.