Skip to content

Commit e3c24ec

Browse files
amey-raghatateAkshay-Belsare
authored andcommitted
aes: remove CFG_TA_OPTEE_CORE_API_COMPAT_1_1
Remove CFG_TA_OPTEE_CORE_API_COMPAT_1_1=y to fix TA panic 0x0 from null handle operations. Change tag_len/out_len from uint32_t to size_t in auth_enc_op() to match modern TEE API function signatures for TEE_AEEncryptFinal and TEE_AEDecryptFinal. Fix format specifiers from %d to %zu for size_t variables to resolve compiler warnings. Signed-off-by: Amey Avinash Raghatate <ameyavinash.raghatate@amd.com>
1 parent 3ef17eb commit e3c24ec

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

aes/ta/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CFG_TEE_TA_LOG_LEVEL ?= 4
2-
CFG_TA_OPTEE_CORE_API_COMPAT_1_1=y
32

43
# The UUID for the Trusted Application
54
BINARY=5dbac793-f574-4871-8ad3-04331ec17f24

aes/ta/aes_ta.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static TEE_Result cipher_buffer(void *session, uint32_t param_types,
327327
return TEE_ERROR_BAD_PARAMETERS;
328328

329329
if (params[1].memref.size < params[0].memref.size) {
330-
EMSG("Bad sizes: in %d, out %d", params[0].memref.size,
330+
EMSG("Bad sizes: in %zu, out %zu", params[0].memref.size,
331331
params[1].memref.size);
332332
return TEE_ERROR_BAD_PARAMETERS;
333333
}
@@ -347,8 +347,8 @@ static TEE_Result auth_enc_op(void *session, uint32_t param_types, TEE_Param par
347347
{
348348
struct aes_cipher *sess = session;
349349
TEE_Result res = TEE_ERROR_OUT_OF_MEMORY;
350-
uint32_t tag_len = 0;
351-
uint32_t out_len = 0;
350+
size_t tag_len = 0;
351+
size_t out_len = 0;
352352
void *in_buf = NULL;
353353
size_t in_sz = 0;
354354
bool encrypt = true;

0 commit comments

Comments
 (0)