public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org,
	Siddhesh Poyarekar <siddhesh@sourceware.org>,
	Florian Weimer <fweimer@redhat.com>,
	Sergei Trofimovich <slyfox@gentoo.org>
Subject: Re: [PATCH 1/3] Add inhibit_stack_protector to ifuncmain9 [BZ #25680]
Date: Wed, 10 Mar 2021 09:50:30 -0300	[thread overview]
Message-ID: <00d1c526-cff0-8b00-1009-a488695d1f86@linaro.org> (raw)
In-Reply-To: <20210310101400.3904724-2-siddhesh@sourceware.org>



On 10/03/2021 07:13, Siddhesh Poyarekar via Libc-alpha wrote:
> From: David Hughes <davidhughes205@gmail.com>
> 
> Enabling --enable-stack-protector=all causes the following tests to fail:
> 
>     FAIL: elf/ifuncmain9picstatic
>     FAIL: elf/ifuncmain9static
> 
> Nick Alcock (who committed the stack protector code) marked the IFUNC
> resolvers with inhibit_stack_protector when he done the original work and
> suggested doing so again @ BZ #25680. This patch adds
> inhibit_stack_protector to ifuncmain9.
> 
> After patch is applied, --enable-stack-protector=all does not fail the
> above tests.

The BZ#25680 report makes me wonder if would be better to just disable
--enable-stack-protector=all on architecture with IFUNC for now.
This fix the issue on glibc testsuite, but it might still trigger
by users if this same trick is not used (as noted by Sergei).

Florian stated on comment #2 that “all” is very unlikely to add 
additional protection and this basically adds *another* undocumented 
ifunc restriction. And it seems likely that distributions like Gentoo 
will just use 'strong' instead of 'all'.

So, what would be the implications of limiting stack protection to
'strong' instead of 'all' for ABIs with ifunc? Is this issue only
redistricted to some ABIs (the reported indicates that only x86_64
is affected)?

> ---
>  elf/ifuncmain9.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c
> index 2c4e95a051..e775c5cfa9 100644
> --- a/elf/ifuncmain9.c
> +++ b/elf/ifuncmain9.c
> @@ -43,6 +43,7 @@ implementation (void)
>  }
>  
>  static __typeof__ (implementation) *
> +inhibit_stack_protector
>  resolver (void)
>  {
>    ++resolver_called;
> 

  reply	other threads:[~2021-03-10 12:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 10:13 [PATCH v2 0/3] Clean up stack-protector-all build Siddhesh Poyarekar
2021-03-10 10:13 ` [PATCH 1/3] Add inhibit_stack_protector to ifuncmain9 [BZ #25680] Siddhesh Poyarekar
2021-03-10 12:50   ` Adhemerval Zanella [this message]
2021-03-12  8:52     ` Siddhesh Poyarekar
2021-03-12 17:34       ` Adhemerval Zanella
2021-03-12 19:55         ` H.J. Lu
2021-03-13  6:01           ` Siddhesh Poyarekar
2021-03-13 13:44             ` H.J. Lu
2021-03-13  6:07         ` Siddhesh Poyarekar
2021-03-15 13:58           ` Adhemerval Zanella
2021-03-15 16:34             ` Siddhesh Poyarekar
2021-03-15 13:59   ` Adhemerval Zanella
2021-03-10 10:13 ` [PATCH 2/3] Build get-cpuid-feature-leaf.c without stack-protector [BZ #27555] Siddhesh Poyarekar
2021-03-15 13:59   ` Adhemerval Zanella
2021-03-10 10:14 ` [PATCH 3/3] Build libc-start with stack protector for SHARED Siddhesh Poyarekar
2021-03-15 14:00   ` Adhemerval Zanella

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=00d1c526-cff0-8b00-1009-a488695d1f86@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@sourceware.org \
    --cc=slyfox@gentoo.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).