* [PATCH master] ARM: stm32mp: disable stm32mp1_barebox_entry stack canary
@ 2023-11-01 13:58 Ahmad Fatoum
2023-11-03 7:37 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-11-01 13:58 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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@pengutronix.de>
---
arch/arm/mach-stm32mp/ddrctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH master] ARM: stm32mp: disable stm32mp1_barebox_entry stack canary
2023-11-01 13:58 [PATCH master] ARM: stm32mp: disable stm32mp1_barebox_entry stack canary Ahmad Fatoum
@ 2023-11-03 7:37 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-11-03 7:37 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
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@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 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-03 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01 13:58 [PATCH master] ARM: stm32mp: disable stm32mp1_barebox_entry stack canary Ahmad Fatoum
2023-11-03 7:37 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox