From: Daniil Stas <daniil.stas@posteo.net>
To: Baruch Siach <baruch@tkos.co.il>
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, 6 Feb 2022 20:47:00 +0000 [thread overview]
Message-ID: <20220206224700.4b3519b2@ux550ve> (raw)
In-Reply-To: <87mtj3de6j.fsf@tarshish>
Hi, Baruch
> 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
>
Yes, if you pass ENABLE_STACK_PROTECTOR=0 argument to the make command
you will get this error.
I don't know what is the proper fix here...
The current TF-A documentation says that the valid
ENABLE_STACK_PROTECTOR values are: "all", "strong", "default" and
"none". And the comments in Buildroot say that's older versions didn't
support "none" value and expected "0" value instead (looks like it was
changed in TF-A commit fd7b287cbe).
Maybe Buildroot should check the TF-A version and only pass "0" to the
old versions. But I don't know if this version comparison can be
implemented in Buildroot.
Or maybe we can give user an additional option to specify how to pass
ENABLE_STACK_PROTECTOR argument, but this doesn't look very
convenient...
Or maybe it's better to patch TF-A so the newer versions treated "0"
value exactly as "none"...
Best regards,
Daniil
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-02-06 20: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
2022-02-06 20:47 ` Daniil Stas [this message]
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=20220206224700.4b3519b2@ux550ve \
--to=daniil.stas@posteo.net \
--cc=baruch@tkos.co.il \
--cc=buildroot@buildroot.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox