All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Baruch Siach <baruch@tkos.co.il>
Cc: Sergey Matyukevich <geomatsi@gmail.com>,
	Julien Olivain <ju.o@free.fr>,
	Baruch Siach via buildroot <buildroot@buildroot.org>,
	buildroot@busybox.net, Heiko Thiery <heiko.thiery@gmail.com>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: [Buildroot] [PATCH] boot/arm-trusted-firmware: don't enable SSP by default
Date: Fri, 11 Nov 2022 21:18:09 +0100	[thread overview]
Message-ID: <20221111211809.5cd3802e@windsurf> (raw)
In-Reply-To: <bab58c04544d0247bce855c8b984ce0d5349def4.1666935387.git.baruch@tkos.co.il>

Hello Baruch,

On Fri, 28 Oct 2022 08:36:27 +0300
Baruch Siach via buildroot <buildroot@buildroot.org> wrote:

> SSP support requires support in ATF platform code. Not all platforms
> implement plat_get_stack_protector_canary() hook. The result is build
> failure:
> 
> (.text.asm.update_stack_protector_canary+0x4): undefined reference to `plat_get_stack_protector_canary'
> 
> Commit cf176128ec4 ("boot/arm-trusted-firmware: add SSP option")
> originally introduces this issue. But then commit ccac9a5bbbd
> ("boot/arm-trusted-firmware: don't force ENABLE_STACK_PROTECTOR") hid
> the problem by effectively disabling SSP for all platforms. So only
> after commit 09acc7cbc91f5 ("boot/arm-trusted-firmware: fix SSP
> support") the issue showed up.
> 
> Make SSP an opt-in for platform that actually provide the
> plat_get_stack_protector_canary() hook.
> 
> Cc: Sergey Matyukevich <geomatsi@gmail.com>
> Cc: Dick Olsson <hi@senzilla.io>
> Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Unfortunately, it seems like the SSP stuff for TF-A still doesn't work.
We still have build failures on several defconfigs:

https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821171
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821262
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821323
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821325
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821326
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821327
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821374
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821374
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821388
https://gitlab.com/buildroot.org/buildroot/-/jobs/3301821583

Since your commit 09acc7cbc91f50305730ca0690a58fb93529034b
boot/arm-trusted-firmware: fix SSP support, we no longer force disable
SSP support when BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is disabled.

If one of BR2_SSP_REGULAR, BR2_SSP_STRONG or BR2_SSP_ALL is enabled,
all code gets built with SSP, including the TF-A code.

Prior to commit 09acc7cbc91f50305730ca0690a58fb93529034b, we were
passing ENABLE_STACK_PROTECTOR=0 when
BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP was disabled, making sure that TF-A
was forcefully disabling SSP, even if it was globally enabled via one
of BR2_SSP_...

So I'm afraid the fix in 09acc7cbc91f50305730ca0690a58fb93529034b does
not work :-/

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-11-11 20:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28  5:36 [Buildroot] [PATCH] boot/arm-trusted-firmware: don't enable SSP by default Baruch Siach via buildroot
2022-10-28  6:47 ` Thomas Petazzoni via buildroot
2022-11-02 22:45 ` Peter Korsgaard
2022-11-11 20:18 ` Thomas Petazzoni via buildroot [this message]
2022-11-13 18:03   ` Baruch Siach via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111211809.5cd3802e@windsurf \
    --to=buildroot@buildroot.org \
    --cc=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    --cc=festevam@gmail.com \
    --cc=geomatsi@gmail.com \
    --cc=heiko.thiery@gmail.com \
    --cc=ju.o@free.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.