[PATCH master] ARM: stm32mp: disable stm32mp1_barebox_entry stack canary

Sascha Hauer sha at pengutronix.de
Fri Nov 3 00:37:45 PDT 2023


On Wed, Nov 01, 2023 at 02:58:11PM +0100, Ahmad Fatoum wrote:
> stm32mp1_barebox_entry is given a stack canary when compiling PBL with
> strong stack protector. The function can be called prior to relocation
> though, so it needs to be marked as such.
> 
> This fixes boot with CONFIG_PBL_STACKPROTECTOR_STRONG=y on STM32MP1 with
> generic BL33 entry point (for FIP).
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  arch/arm/mach-stm32mp/ddrctrl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-stm32mp/ddrctrl.c b/arch/arm/mach-stm32mp/ddrctrl.c
> index 279a35f30310..f198ee196c6c 100644
> --- a/arch/arm/mach-stm32mp/ddrctrl.c
> +++ b/arch/arm/mach-stm32mp/ddrctrl.c
> @@ -123,7 +123,7 @@ static inline unsigned stm32mp1_ddrctrl_ramsize(void)
>  	return ddrctrl_ramsize(IOMEM(STM32_DDRCTL_BASE), nb_bytes);
>  }
>  
> -void __noreturn stm32mp1_barebox_entry(void *boarddata)
> +void __noreturn __prereloc stm32mp1_barebox_entry(void *boarddata)
>  {
>  	barebox_arm_entry(STM32_DDR_BASE, stm32mp1_ddrctrl_ramsize(), boarddata);
>  }
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list