From 6c276b0808defbab0d468658a7b673e718439e95 Mon Sep 17 00:00:00 2001 From: Jens Wiklander Date: Tue, 18 Aug 2020 15:51:59 +0200 Subject: core: tee_obj_get() return TEE_ERROR_BAD_STATE Updates tee_obj_get() to return TEE_ERROR_BAD_STATE when an object reference can't be found. This will allow the GP TA API to panic the caller as required in the GP spec [1]. [1] GlobalPlatform TEE Internal Core API Specification v1.1 Acked-by: Etienne Carriere Signed-off-by: Jens Wiklander --- core/tee/tee_obj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/tee') diff --git a/core/tee/tee_obj.c b/core/tee/tee_obj.c index 64d3df36..510551f4 100644 --- a/core/tee/tee_obj.c +++ b/core/tee/tee_obj.c @@ -30,7 +30,7 @@ TEE_Result tee_obj_get(struct user_ta_ctx *utc, uint32_t obj_id, return TEE_SUCCESS; } } - return TEE_ERROR_BAD_PARAMETERS; + return TEE_ERROR_BAD_STATE; } void tee_obj_close(struct user_ta_ctx *utc, struct tee_obj *o) -- cgit v1.2.3