From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Daniil Stas <daniil.stas@posteo.net>
Cc: Sergey Matyukevich <geomatsi@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [BUG] boot/arm-trusted-firmware: Stack protection setting doesn't work
Date: Sun, 06 Feb 2022 20:43:21 +0200 [thread overview]
Message-ID: <87mtj3de6j.fsf@tarshish> (raw)
In-Reply-To: <20220206020711.3dc6e42e@ux550ve>
Hi Daniil Stas,
On Sun, Feb 06 2022, Daniil Stas wrote:
> The bug was introduced in commit ccac9a5bbb
> ("boot/arm-trusted-firmware: don't force ENABLE_STACK_PROTECTOR").
>
> In this commit the ENABLE_STACK_PROTECTOR option was moved from make
> arguments to the environment. But this value gets overwritten in
> make_helpers/defaults.mk (and platform specific makefiles) before it
> gets handled in the lib/stack_protector/stack_protector.mk.
> So setting it via environment doesn't work.
>
> You can check it, for example, if you compile TF-A for stm32mp157a_dk1
> platform, and then check if bl32/stack_protector.o file is
> built.
> It gets built only with commit ccac9a5bbb being reverted.
What happens when you build with a toolchain that has no SSP support
with the commit you mentioned reverted? I believe you will get a build
error similar to this one:
aarch64-buildroot-linux-uclibc-gcc.br_real: error: unrecognized command-line option ‘-fstack-protector-0’; did you mean ‘-fstack-protector’?
aarch64-buildroot-linux-uclibc-gcc.br_real: error: unrecognized command-line option ‘-fstack-protector-0’; did you mean ‘-fstack-protector’?
Makefile:1075: recipe for target '/builds/buildroot.org/buildroot/output/build/arm-trusted-firmware-v2.4/build/a80x0_mcbin/release/libc/assert.o' failed
make[1]: *** [/builds/buildroot.org/buildroot/output/build/arm-trusted-firmware-v2.4/build/a80x0_mcbin/release/libc/assert.o] Error 1
Copied from https://gitlab.com/buildroot.org/buildroot/-/jobs/1497663294.
Do you have a better suggestion?
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-02-06 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-06 0:07 [Buildroot] [BUG] boot/arm-trusted-firmware: Stack protection setting doesn't work Daniil Stas
2022-02-06 18:43 ` Baruch Siach via buildroot [this message]
2022-02-06 20:47 ` Daniil Stas
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=87mtj3de6j.fsf@tarshish \
--to=buildroot@buildroot.org \
--cc=baruch@tkos.co.il \
--cc=daniil.stas@posteo.net \
--cc=geomatsi@gmail.com \
--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.