From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC for-next] package/gcc: enable secureplt for powerpc64
Date: Tue, 18 May 2021 14:05:43 +0200 [thread overview]
Message-ID: <20210518120543.GC2506@scaer> (raw)
In-Reply-To: <20210517201327.755689-1-romain.naour@gmail.com>
Romain, All,
On 2021-05-17 22:13 +0200, Romain Naour spake thusly:
> GCC support enabling secureplt for powerpc64.
>
> From [1]
> "PowerPC has two PLT models: BSS-PLT and Secure-PLT. BSS-PLT uses
> runtime code generation to generate the PLT stubs. Secure-PLT was
> introduced with GCC 4.1 and Binutils 2.17 (base has GCC 4.2.1 and
> Binutils 2.17), and is a more secure PLT format, using a read-only
gcc 4.1 and binutils 2.17 are really old, now; everything and everyone
has better than that nowadays.
> linkage table, with the dynamic linker populating a non-executable
> index table."
>
> This option is always enabled by glibc testing script
> called build-many-glibcs.py [1]. This script exist since
> glibc 2.25.
>
> Runtime tested with qemu_ppc64_e5500_defconfig.
Good enough for me.
> [1] https://reviews.freebsd.org/D20598
> [2] https://sourceware.org/git/?p=glibc.git;a=blob;f=scripts/build-many-glibcs.py;h=9c08ab7b326e6385abb835eb32dd143952a71942;hb=9826b03b747b841f5fc6de2054bf1ef3f5c4bdf3#l345
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Matt Weber <matthew.weber@collins.com>
Applied to next, thanks.
Regards,
Yann E. MORIN.
> ---
>
> While looking at ppc secureplt issue with BR2_PIC_PIE, I noticed
> that gcc --enable-secureplt option was only used for BR2_powerpc
> although it's also available for powerpc64.
>
> I don't have a powerpc64 hardware for real testing.
> Test welcome.
> ---
> package/gcc/gcc.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 5e419f7ede..ed9b93e50f 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -231,7 +231,7 @@ endif
> # Set default to Secure-PLT to prevent run-time
> # generation of PLT stubs (supports RELRO and
> # SELinux non-exemem capabilities)
> -ifeq ($(BR2_powerpc),y)
> +ifeq ($(BR2_powerpc)$(BR2_powerpc64),y)
> HOST_GCC_COMMON_CONF_OPTS += --enable-secureplt
> endif
>
> --
> 2.31.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2021-05-18 12:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 20:13 [Buildroot] [RFC for-next] package/gcc: enable secureplt for powerpc64 Romain Naour
2021-05-18 12:05 ` Yann E. MORIN [this message]
2021-05-18 13:20 ` [Buildroot] [External] " Weber, Matthew L Collins
2021-05-18 13:39 ` Yann E. MORIN
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=20210518120543.GC2506@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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.