summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <[email protected]>2025-11-11 08:16:28 +0100
committerTom Rini <[email protected]>2025-11-18 12:50:05 -0600
commitfe114f3662c655cae44b45370d6dc4de2055a611 (patch)
tree387a0b73c0df2aff3b676658470598247bc487d1
parent40768f5ed3ef82ac11236cdd2e50cde79b5debe5 (diff)
mach-k3: security: Propagate verified image addr
The ti_secure_image_check() function may relocate the image during authentication, updating image_addr to point to the verified location. The caller was not updated with this new address, causing it to reference the original unverified location. Update p_image with the verified image address after authentication to ensure subsequent operations use the correct location. Signed-off-by: Philippe Schenker <[email protected]>
-rw-r--r--arch/arm/mach-k3/security.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index 3468a370a45..c7017bba99a 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -119,6 +119,8 @@ void ti_secure_image_post_process(void **p_image, size_t *p_size)
*/
*p_size = image_size;
+ *p_image = (void *)(uintptr_t)image_addr;
+
/*
* Output notification of successful authentication to re-assure the
* user that the secure code is being processed as expected. However