public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: mach-keystone: Modify secure image size before copy
@ 2017-06-29 13:38 Andrew F. Davis
  2017-06-30  1:59 ` Lokesh Vutla
  2017-07-11 12:41 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew F. Davis @ 2017-06-29 13:38 UTC (permalink / raw)
  To: u-boot

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 <afd@ti.com>
---
 arch/arm/mach-keystone/mon.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c
index 81009848d0..ebfb483a1b 100644
--- a/arch/arm/mach-keystone/mon.c
+++ b/arch/arm/mach-keystone/mon.c
@@ -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
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] arm: mach-keystone: Modify secure image size before copy
  2017-06-29 13:38 [U-Boot] [PATCH] arm: mach-keystone: Modify secure image size before copy Andrew F. Davis
@ 2017-06-30  1:59 ` Lokesh Vutla
  2017-07-11 12:41 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2017-06-30  1:59 UTC (permalink / raw)
  To: u-boot



On Thursday 29 June 2017 07:08 PM, Andrew F. Davis wrote:
> 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 <afd@ti.com>

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] arm: mach-keystone: Modify secure image size before copy
  2017-06-29 13:38 [U-Boot] [PATCH] arm: mach-keystone: Modify secure image size before copy Andrew F. Davis
  2017-06-30  1:59 ` Lokesh Vutla
@ 2017-07-11 12:41 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-07-11 12:41 UTC (permalink / raw)
  To: u-boot

On Thu, Jun 29, 2017 at 08:38:25AM -0500, Andrew F. Davis wrote:

> 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 <afd@ti.com>
> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-11 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-29 13:38 [U-Boot] [PATCH] arm: mach-keystone: Modify secure image size before copy Andrew F. Davis
2017-06-30  1:59 ` Lokesh Vutla
2017-07-11 12:41 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox