diff mbox series

[1/1] configs/imx8{m,mm}pico: disable ATF SSP

Message ID 20221022142040.625468-1-ju.o@free.fr
State Superseded
Headers show
Series [1/1] configs/imx8{m,mm}pico: disable ATF SSP | expand

Commit Message

Julien Olivain Oct. 22, 2022, 2:20 p.m. UTC
imx8{m,mm}pico configs are currently failing at ATF link with output:

    aarch64-buildroot-linux-gnu-ld: asm_stack_protector.o: in function `update_stack_protector_canary':
    (.text.asm.update_stack_protector_canary+0x4): undefined reference to `plat_get_stack_protector_canary'

The ATF version in those configs does not provide platform level
support for SSP.

This build failure was introduced by commit
09acc7cbc91f50305730ca0690a58fb93529034b
"boot/arm-trusted-firmware: fix SSP support". Before this commit,
ATF SSP was globally disabled, by default.

This commit fixes those build issues by disabling the ATF SSP in the
defconfigs.

Fixes:
  - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498119
  - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498120

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 configs/imx8mmpico_defconfig | 1 +
 configs/imx8mpico_defconfig  | 1 +
 2 files changed, 2 insertions(+)

Comments

Fabio Estevam Oct. 27, 2022, 2:22 p.m. UTC | #1
Hi Julien,

On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o@free.fr> wrote:
>
> imx8{m,mm}pico configs are currently failing at ATF link with output:
>
>     aarch64-buildroot-linux-gnu-ld: asm_stack_protector.o: in function `update_stack_protector_canary':
>     (.text.asm.update_stack_protector_canary+0x4): undefined reference to `plat_get_stack_protector_canary'
>
> The ATF version in those configs does not provide platform level
> support for SSP.
>
> This build failure was introduced by commit
> 09acc7cbc91f50305730ca0690a58fb93529034b
> "boot/arm-trusted-firmware: fix SSP support". Before this commit,
> ATF SSP was globally disabled, by default.
>
> This commit fixes those build issues by disabling the ATF SSP in the
> defconfigs.
>
> Fixes:
>   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498119
>   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498120
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>

I met the same build error when trying to build kontron_bl_imx8mm_defconfig.

Tried your suggestion and it fixes the build error:

diff --git a/configs/kontron_bl_imx8mm_defconfig
b/configs/kontron_bl_imx8mm_defconfig
index ff376662e9e5..b05828981081 100644
--- a/configs/kontron_bl_imx8mm_defconfig
+++ b/configs/kontron_bl_imx8mm_defconfig
@@ -34,6 +34,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30880000"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y

Does this need to be fixed globally? I suspect other defconfigs face
the same error.

Thanks
Heiko Thiery Oct. 27, 2022, 2:33 p.m. UTC | #2
Hi,

Am Do., 27. Okt. 2022 um 16:22 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Julien,
>
> On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o@free.fr> wrote:
> >
> > imx8{m,mm}pico configs are currently failing at ATF link with output:
> >
> >     aarch64-buildroot-linux-gnu-ld: asm_stack_protector.o: in function `update_stack_protector_canary':
> >     (.text.asm.update_stack_protector_canary+0x4): undefined reference to `plat_get_stack_protector_canary'
> >
> > The ATF version in those configs does not provide platform level
> > support for SSP.
> >
> > This build failure was introduced by commit
> > 09acc7cbc91f50305730ca0690a58fb93529034b
> > "boot/arm-trusted-firmware: fix SSP support". Before this commit,
> > ATF SSP was globally disabled, by default.
> >
> > This commit fixes those build issues by disabling the ATF SSP in the
> > defconfigs.
> >
> > Fixes:
> >   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498119
> >   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498120
> >
> > Signed-off-by: Julien Olivain <ju.o@free.fr>
>
> I met the same build error when trying to build kontron_bl_imx8mm_defconfig.
>
> Tried your suggestion and it fixes the build error:
>
> diff --git a/configs/kontron_bl_imx8mm_defconfig
> b/configs/kontron_bl_imx8mm_defconfig
> index ff376662e9e5..b05828981081 100644
> --- a/configs/kontron_bl_imx8mm_defconfig
> +++ b/configs/kontron_bl_imx8mm_defconfig
> @@ -34,6 +34,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
> +# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30880000"
>  BR2_TARGET_UBOOT=y
>  BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
>
> Does this need to be fixed globally? I suspect other defconfigs face
> the same error.

I see the same issue with the kontron_pitx_imx8m_defconfig.
Baruch Siach Oct. 27, 2022, 3:21 p.m. UTC | #3
Hi Fabio,

On Thu, Oct 27 2022, Fabio Estevam wrote:
> On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o@free.fr> wrote:
>>
>> imx8{m,mm}pico configs are currently failing at ATF link with output:
>>
>>     aarch64-buildroot-linux-gnu-ld: asm_stack_protector.o: in function `update_stack_protector_canary':
>>     (.text.asm.update_stack_protector_canary+0x4): undefined reference to `plat_get_stack_protector_canary'
>>
>> The ATF version in those configs does not provide platform level
>> support for SSP.
>>
>> This build failure was introduced by commit
>> 09acc7cbc91f50305730ca0690a58fb93529034b
>> "boot/arm-trusted-firmware: fix SSP support". Before this commit,
>> ATF SSP was globally disabled, by default.
>>
>> This commit fixes those build issues by disabling the ATF SSP in the
>> defconfigs.
>>
>> Fixes:
>>   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498119
>>   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498120
>>
>> Signed-off-by: Julien Olivain <ju.o@free.fr>
>
> I met the same build error when trying to build kontron_bl_imx8mm_defconfig.
>
> Tried your suggestion and it fixes the build error:
>
> diff --git a/configs/kontron_bl_imx8mm_defconfig
> b/configs/kontron_bl_imx8mm_defconfig
> index ff376662e9e5..b05828981081 100644
> --- a/configs/kontron_bl_imx8mm_defconfig
> +++ b/configs/kontron_bl_imx8mm_defconfig
> @@ -34,6 +34,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
> +# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30880000"
>  BR2_TARGET_UBOOT=y
>  BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
>
> Does this need to be fixed globally? I suspect other defconfigs face
> the same error.

The global fix might be this:

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 5070849d9b43..a9b9bbcc5a1f 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -212,7 +212,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
 	bool "Build with SSP"
-	default y
 	depends on BR2_TOOLCHAIN_HAS_SSP
 	depends on !BR2_SSP_NONE
 	help

Commit cf176128ec4 ("boot/arm-trusted-firmware: add SSP option")
mentions that not all platform implement the require hook for SSP. So I
think that enabling SSP by default is not the right choice.

baruch
Fabio Estevam Oct. 28, 2022, 3:03 a.m. UTC | #4
Hi Baruch,

On Thu, Oct 27, 2022 at 12:24 PM Baruch Siach <baruch@tkos.co.il> wrote:

> The global fix might be this:
>
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index 5070849d9b43..a9b9bbcc5a1f 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -212,7 +212,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
>
>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
>         bool "Build with SSP"
> -       default y
>         depends on BR2_TOOLCHAIN_HAS_SSP
>         depends on !BR2_SSP_NONE
>         help
>
> Commit cf176128ec4 ("boot/arm-trusted-firmware: add SSP option")
> mentions that not all platform implement the require hook for SSP. So I
> think that enabling SSP by default is not the right choice.

Yes, that is a proper fix.

Thanks
Heiko Thiery Oct. 28, 2022, 4:59 a.m. UTC | #5
Hi,

Am Fr., 28. Okt. 2022 um 05:04 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Baruch,
>
> On Thu, Oct 27, 2022 at 12:24 PM Baruch Siach <baruch@tkos.co.il> wrote:
>
> > The global fix might be this:
> >
> > diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> > index 5070849d9b43..a9b9bbcc5a1f 100644
> > --- a/boot/arm-trusted-firmware/Config.in
> > +++ b/boot/arm-trusted-firmware/Config.in
> > @@ -212,7 +212,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
> >
> >  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
> >         bool "Build with SSP"
> > -       default y
> >         depends on BR2_TOOLCHAIN_HAS_SSP
> >         depends on !BR2_SSP_NONE
> >         help
> >
> > Commit cf176128ec4 ("boot/arm-trusted-firmware: add SSP option")
> > mentions that not all platform implement the require hook for SSP. So I
> > think that enabling SSP by default is not the right choice.
>
> Yes, that is a proper fix.
>
> Thanks

I can also confirm that it works again with the change.
diff mbox series

Patch

diff --git a/configs/imx8mmpico_defconfig b/configs/imx8mmpico_defconfig
index 7c19c8c81b..55fd2d01c1 100644
--- a/configs/imx8mmpico_defconfig
+++ b/configs/imx8mmpico_defconfig
@@ -22,6 +22,7 @@  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/e
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="lf-5.10.72-2.2.0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
diff --git a/configs/imx8mpico_defconfig b/configs/imx8mpico_defconfig
index 55746fb67e..d7e5b6273a 100644
--- a/configs/imx8mpico_defconfig
+++ b/configs/imx8mpico_defconfig
@@ -22,6 +22,7 @@  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/e
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="lf-5.10.72-2.2.0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_TARBALL=y