From 5d54ca437ac2ea08db94c2a2c56cb336e98b5f13 Mon Sep 17 00:00:00 2001 From: Cedric Auger Date: Thu, 15 Feb 2024 20:06:19 +0100 Subject: [PATCH] ta: os_test: Unmask cancellation from invoke command handler The specification seems to indicate (see https://github.com/OP-TEE/optee_test/issues/731) that the cancellation mask is reset at the start of every entry point. As a result, the TEE_UnmakCancellation() should not be called at the end of TA_OpenSessionEntryPoint(), but at the start of TA_InvokeCommandEntryPoint(). Signed-off-by: Cedric Auger Reviewed-by: Jerome Forissier Acked-by: Etienne Carriere --- ta/os_test/ta_entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ta/os_test/ta_entry.c b/ta/os_test/ta_entry.c index aaccf0ffa..56f3ef0ae 100644 --- a/ta/os_test/ta_entry.c +++ b/ta/os_test/ta_entry.c @@ -36,7 +36,6 @@ TEE_Result TA_OpenSessionEntryPoint(uint32_t nParamTypes, (void)pParams; (void)ppSessionContext; DMSG("TA_OpenSessionEntryPoint"); - TEE_UnmaskCancellation(); return TEE_SUCCESS; } @@ -63,6 +62,7 @@ TEE_Result TA_InvokeCommandEntryPoint(void *pSessionContext, TEE_Param pParams[4]) { (void)pSessionContext; + TEE_UnmaskCancellation(); switch (nCommandID) { case TA_OS_TEST_CMD_INIT: