arm: mach-keystone: Modify secure image size before copy
PATCH 1/1 arm: mach-keystone: Modify secure image size before copy
The size of the secure image does not include the size of the header, subtract this out before we move the image or we grab extra data after the image.
Signed-off-by Andrew F. Davis <[email protected]>
--- arch/arm/mach-keystone/mon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-keystone/mon.c +5 -5
@@ -114,12 +114,12 @@ void board_fit_image_post_process(void **p_image, size_t *p_size) }/* -* Overwrite the image headers after authentication -* and decryption. Update size to reflect removal -* of header. -*/ -memcpy (image, image +KS2_HS_SEC_HEADER_LEN , *p_size); +* Overwrite the image headers after authentication +* and decryption. Update size to reflect removal +* of header. +*/ *p_size -=KS2_HS_SEC_HEADER_LEN ; +memcpy (image, image +KS2_HS_SEC_HEADER_LEN , *p_size);/* * Output notification of successful authentication to re-assure the
Signature · 1 line
2.13.0
PATCH 1/1 arm: mach-keystone: Modify secure image size before copy
Quoted 5 lines · Andrew F. Davis
The size of the secure image does not include the size of the header, subtract this out before we move the image or we grab extra data after the image.
Signed-off-by Andrew F. Davis <[email protected]>
Reviewed-by Lokesh Vutla <[email protected]>
Thanks and regards,
Lokesh
Quoted 6 lines · Andrew F. Davis
The size of the secure image does not include the size of the header, subtract this out before we move the image or we grab extra data after the image.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Lokesh Vutla <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170711/c5e71e69/attachment.sig>