From: Iain Buclaw <ibuclaw@gdcproject.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libphobos: Include <cet.h> to generate the CET marker for -fcf-protection
Date: Wed, 09 Sep 2020 19:20:14 +0200 [thread overview]
Message-ID: <1599671971.uwly54d5j8.astroid@galago.none> (raw)
In-Reply-To: <CAMe9rOoTnf6wEUu8_NkE5zUpfSV94sgEQajUAnincSghvoO=3w@mail.gmail.com>
Excerpts from H.J. Lu's message of September 9, 2020 7:08 pm:
> On Mon, Sep 7, 2020 at 7:09 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> On Mon, Sep 7, 2020 at 2:35 PM Iain Buclaw <ibuclaw@gdcproject.org> wrote:
>> >
>> > Hi,
>> >
>> > This patch removes whatever CET support was in the switchContext routine
>> > for x86 D runtime, and instead uses the ucontext fallback, which propely
>> > handles shadow stack handling.
>> >
>> > Rather than implementing support within D runtime itself, use libc
>> > getcontext/setcontext functions if CET is enabled instead.
>> >
>> > HJ, does this look reasonable before I commit it? The detection has
>> > been done at configure-time, rather than adding a predefined version
>> > condition for CET within the compiler.
>> >
>> > Done regression testing on x86_64-linux-gnu/-m32/-mx32.
>> >
>> > Regards
>> > Iain.
>> >
>> > ---
>> > libphobos/ChangeLog:
>> >
>> > PR d/95680
>> > * Makefile.in: Regenerate.
>> > * configure: Regenerate.
>> > * configure.ac (DCFG_ENABLE_CET): Substitute.
>> > * libdruntime/Makefile.in: Regenerate.
>> > * libdruntime/config/x86/switchcontext.S: Remove CET support code.
>> > * libdruntime/core/thread.d: Import gcc.config. Don't set version
>> > AsmExternal when GNU_Enable_CET is true.
>> > * libdruntime/gcc/config.d.in (GNU_Enable_CET): Define.
>> > * src/Makefile.in: Regenerate.
>> > * testsuite/Makefile.in: Regenerate.
>>
>> Looks good. I can try it on Tiger Lake after it has been checked in.
>>
>
> Here is the patch to enable the CET marker for -fcf-protection.
> I saw some D run-time failures. I will investigate them.
>
Thanks, feel free to commit.
Iain.
prev parent reply other threads:[~2020-09-09 17:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 21:35 [PATCH] libphobos: libdruntime doesn't support shadow stack (PR95680) Iain Buclaw
2020-09-08 2:09 ` H.J. Lu
2020-09-08 10:16 ` Iain Buclaw
2020-09-08 21:34 ` Rainer Orth
2020-09-09 22:57 ` Iain Buclaw
2020-09-10 10:41 ` Rainer Orth
2020-09-09 17:08 ` [PATCH] libphobos: Include <cet.h> to generate the CET marker for -fcf-protection H.J. Lu
2020-09-09 17:20 ` Iain Buclaw [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=1599671971.uwly54d5j8.astroid@galago.none \
--to=ibuclaw@gdcproject.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).