On Mon, Sep 7, 2020 at 2:35 PM Iain Buclaw <ibuc...@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. Thanks. -- H.J.