* [PATCH] imx: hab: Use size parameter
@ 2023-08-31 14:57 Marek Vasut
2023-10-16 16:46 ` sbabic
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2023-08-31 14:57 UTC (permalink / raw)
To: u-boot
Cc: Marek Vasut, NXP i.MX U-Boot Team, Fabio Estevam, Peng Fan,
Rasmus Villemoes, Stefano Babic, Tim Harvey
The current code works by sheer coincidence, because (see HABv4 API
documentation, section 3.4) the RVT authenticate_image call updates
the size that is passed in with the actual size ROM code pulls from
IVT/CSF . So if the input size is larger, that is "fine" . Pass in
size instead to make this really correct.
Signed-off-by: Marek Vasut <marex@denx.de>
---
NOTE: Rasmus, can you please double-check this one ? Thanks
---
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
---
arch/arm/mach-imx/spl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 6c13b00ef10..b30cd962553 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -353,7 +353,7 @@ void *spl_load_simple_fit_fix_load(const void *fit)
debug("%s: ivt: %p offset: %lx size: %lx\n", __func__, ivt, offset, size);
debug("%s: ivt self: %x\n", __func__, ivt->self);
- if (imx_hab_authenticate_image((uintptr_t)fit, (uintptr_t)ivt, offset))
+ if (imx_hab_authenticate_image((uintptr_t)fit, (uintptr_t)size, offset))
panic("spl: ERROR: image authentication unsuccessful\n");
return (void *)fit;
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] imx: hab: Use size parameter
2023-08-31 14:57 [PATCH] imx: hab: Use size parameter Marek Vasut
@ 2023-10-16 16:46 ` sbabic
0 siblings, 0 replies; 2+ messages in thread
From: sbabic @ 2023-10-16 16:46 UTC (permalink / raw)
To: Marek Vasut, u-boot
> The current code works by sheer coincidence, because (see HABv4 API
> documentation, section 3.4) the RVT authenticate_image call updates
> the size that is passed in with the actual size ROM code pulls from
> IVT/CSF . So if the input size is larger, that is "fine" . Pass in
> size instead to make this really correct.
> Signed-off-by: Marek Vasut <marex@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-16 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 14:57 [PATCH] imx: hab: Use size parameter Marek Vasut
2023-10-16 16:46 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox