Skip to content

Commit

Permalink
core: pta: device: fix enumeration for PTA_CMD_GET_DEVICES_SUPP
Browse files Browse the repository at this point in the history
TAs which depend on TEE_STORAGE_PRIVATE do need the TEE supplicant if
REE FS is disabled (in which case secure storage can only be RPMB) and
RPMB is not routed via the kernel.

Fixes: a96033c ("core: add flag to enumerate TAs when secure storage is ready")
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
  • Loading branch information
jforissier committed Jan 17, 2025
1 parent b8a9277 commit 82d8a42
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/pta/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,20 @@ static TEE_Result invoke_command(void *pSessionContext __unused,
{
TEE_Result res = TEE_SUCCESS;
uint32_t rflags = 0;
/*
* This should also be true if CFG_RPMB_ANNOUNCE_PROBE_CAP is
* enabled when the kernel does not support OP-TEE RPMB operations.
*/
bool rpmb_needs_supp = !IS_ENABLED(CFG_RPMB_ANNOUNCE_PROBE_CAP);

switch (nCommandID) {
case PTA_CMD_GET_DEVICES:
rflags = TA_FLAG_DEVICE_ENUM;
break;
case PTA_CMD_GET_DEVICES_SUPP:
rflags = TA_FLAG_DEVICE_ENUM_SUPP;
if (IS_ENABLED(CFG_REE_FS))
if (IS_ENABLED(CFG_REE_FS) ||
(IS_ENABLED(CFG_RPMB_FS) && rpmb_needs_supp))
rflags |= TA_FLAG_DEVICE_ENUM_TEE_STORAGE_PRIVATE;
break;
case PTA_CMD_GET_DEVICES_RPMB:
Expand Down

0 comments on commit 82d8a42

Please sign in to comment.