[PATCH 02/26] spl: nor: Don't allocate header on stack

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Thu Oct 12 09:26:15 CEST 2023


On Thu, Oct 12, 2023 at 5:45 AM Simon Glass <sjg at chromium.org> wrote:
>
> On Wed, 11 Oct 2023 at 18:56, Sean Anderson <seanga2 at gmail.com> wrote:
> >
> > spl_image_info.name contains a reference to legacy_img_hdr. If we allocate
> > the latter on the stack, it will be clobbered after we return. This was
> > addressed for NAND back in 06377c5a1fc ("spl: spl_legacy: Fix NAND boot on
> > OMAP3 BeagleBoard"), but that commit didn't fix NOR.
> >
> > Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> > ---
> >
> >  common/spl/spl_nor.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
 Reviewed-by: Michael Trimarchi <michael at amarulasolutions.com>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael at amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info at amarulasolutions.com
www.amarulasolutions.com


More information about the U-Boot mailing list