From: Andreas Schwab <schwab@suse.de>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] riscv: add support for static PIE
Date: Mon, 22 Jan 2024 13:28:14 +0100 [thread overview]
Message-ID: <mvmsf2pd02p.fsf@suse.de> (raw)
In-Reply-To: <b90b3840-cf9b-4c7b-b90c-16d387db3076@linaro.org> (Adhemerval Zanella Netto's message of "Mon, 22 Jan 2024 09:20:50 -0300")
On Jan 22 2024, Adhemerval Zanella Netto wrote:
> On 22/01/24 06:35, Andreas Schwab wrote:
>> On Jan 18 2024, Adhemerval Zanella Netto wrote:
>>
>>> Otherwise the startup code will trigger an invalid memory access (since the
>>> stack protector is not yet initialized):
>>>
>>> $ gdb ./elf/ldconfig
>>> [...]
>>> (gdb) r
>>> [...]
>>> (gdb) disas
>>> Dump of assembler code for function memset:
>>> 0x00007ffff7f6e3ec <+0>: addi sp,sp,-32
>>> 0x00007ffff7f6e3ee <+2>: auipc a7,0x89
>>> 0x00007ffff7f6e3f2 <+6>: ld a7,2018(a7) # 0x7ffff7ff7bd0
>>> => 0x00007ffff7f6e3f6 <+10>: ld a5,0(a7)
>>
>> I don't see that with -fstack-protector-strong.
>>
>
> It happens with -fstack-protector-all, which although it does not make much
> sense to be used it is still supported.
I think it can be part of a separate commit. Care to provide one?
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2024-01-22 12:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 9:40 Andreas Schwab
2024-01-18 20:48 ` Adhemerval Zanella Netto
2024-01-22 9:35 ` Andreas Schwab
2024-01-22 12:20 ` Adhemerval Zanella Netto
2024-01-22 12:28 ` Andreas Schwab [this message]
2024-01-22 12:42 ` Adhemerval Zanella Netto
2024-01-22 13:14 ` Florian Weimer
2024-01-22 13:45 ` Adhemerval Zanella Netto
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=mvmsf2pd02p.fsf@suse.de \
--to=schwab@suse.de \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.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).