From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: Nix <nix@esperi.org.uk>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Build libc-start with stack protector for SHARED
Date: Mon, 8 Feb 2021 19:51:03 +0530 [thread overview]
Message-ID: <290a38c1-5982-29a7-9d65-9836a73698de@sourceware.org> (raw)
In-Reply-To: <87v9b23cci.fsf@esperi.org.uk>
On 2/8/21 7:12 PM, Nix wrote:
> Is this true when -fstack-protector-all is actiev as well? That's the
> troublesome case that led to my introducing most of these
> $(no-stack-protector)s (and in general I only introduced them where I
> saw real problems).
>
> There *are* (obviously) changes in the function prologue too when
> -fstack-protector is in use, and if there's anywhere those changes might
> really matter it's somewhere like libc-start. Are those changes safe?
> They weren't safe in the past...
The static libc-start is in fact unsafe with fstack-protector, which is
why I enabled stack-protector only for libc-start.os and not
libc-start.o. In the dynamic case, the TLS initialization and stack
canary setup ought to have already happened and using stack and if we
see failures (which I didn't but maybe I missed the configurations
you've tested?) then it's probably an indication of something else
that's wrong.
Also, I checked codegen for libc-start.os with libc-start.os with
stack-protector-strong as well as -all and found no differences compared
to not having stack-protector enabled, which seems logical from the
compiler standpoint since the function technically does not return.
Siddhesh
next prev parent reply other threads:[~2021-02-08 14:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 5:42 Siddhesh Poyarekar
2021-02-03 9:32 ` Florian Weimer
2021-02-03 13:45 ` Siddhesh Poyarekar
2021-02-03 13:48 ` Florian Weimer
2021-02-03 14:35 ` Siddhesh Poyarekar
2021-02-03 14:37 ` Florian Weimer
2021-02-08 13:42 ` Nix
2021-02-08 14:21 ` Siddhesh Poyarekar [this message]
2021-02-08 15:58 ` Nix
2021-02-08 16:02 ` Siddhesh Poyarekar
2021-02-08 19:06 ` Nix
2021-02-11 14:35 ` [PING][PATCH] " Siddhesh Poyarekar
2021-02-11 19:25 ` [PATCH] " Adhemerval Zanella
2021-02-12 0:56 ` Siddhesh Poyarekar
2021-02-12 2:55 ` Siddhesh Poyarekar
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=290a38c1-5982-29a7-9d65-9836a73698de@sourceware.org \
--to=siddhesh@sourceware.org \
--cc=libc-alpha@sourceware.org \
--cc=nix@esperi.org.uk \
/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).