Skip to content

Commit

Permalink
core: pta: attestation: 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 attestation PTA initial
implementation of StMM sadly used the old prototype, using false (0)
instead of TEE_POBJ_USAGE_OPEN (0).

Fixes: 7e05ec2 ("core: pta: add remote attestation PTA")
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 d0989b4 commit ce0d3a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/pta/attestation.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ static TEE_Result sec_storage_obj_read(TEE_UUID *uuid, uint32_t storage_id,
if (obj_id_len > TEE_OBJECT_ID_MAX_LEN)
return TEE_ERROR_BAD_PARAMETERS;

res = tee_pobj_get(uuid, (void *)obj_id, obj_id_len, flags, false, fops,
&po);
res = tee_pobj_get(uuid, (void *)obj_id, obj_id_len, flags,
TEE_POBJ_USAGE_OPEN, fops, &po);
if (res)
return res;

Expand Down Expand Up @@ -272,8 +272,8 @@ static TEE_Result sec_storage_obj_write(TEE_UUID *uuid, uint32_t storage_id,
if (obj_id_len > TEE_OBJECT_ID_MAX_LEN)
return TEE_ERROR_BAD_PARAMETERS;

res = tee_pobj_get(uuid, (void *)obj_id, obj_id_len, flags, false,
fops, &po);
res = tee_pobj_get(uuid, (void *)obj_id, obj_id_len, flags,
TEE_POBJ_USAGE_OPEN, fops, &po);
if (res)
return res;

Expand Down

0 comments on commit ce0d3a4

Please sign in to comment.