]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mach-k3: security: Propagate verified image addr
authorPhilippe Schenker <philippe.schenker@impulsing.ch>
Tue, 11 Nov 2025 07:16:28 +0000 (08:16 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 18 Nov 2025 18:50:05 +0000 (12:50 -0600)
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 <philippe.schenker@impulsing.ch>
arch/arm/mach-k3/security.c

index 3468a370a455240f0e7de88be72e865506db5a58..c7017bba99ab9e213509dfe0205fdac17ff2b53c 100644 (file)
@@ -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