libphobos: libdruntime doesn't support shadow stack (PR95680)
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 7 Sep 2020 13:43:04 +0000 (15:43 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 8 Sep 2020 10:14:56 +0000 (12:14 +0200)
commit285d81be9725acc36dc8eca48d4df506cd5e6f6f
treef11c13f6fd48555b952d1b3df40522ed8e3eecf6
parentcd2d3822ca0f2f743601cc9d048d51f6d326f6a2
libphobos: libdruntime doesn't support shadow stack (PR95680)

Rather than implementing support within D runtime itself, use libc
getcontext/swapcontext functions if CET is enabled.

Removes whatever CET support was in the switchContext routine for x86
D runtime, along with setting version AsmExternal, so that the fallback
ucontext_t implementation is used, which is capable of doing shadow
stack handling.

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.
libphobos/Makefile.in
libphobos/configure
libphobos/configure.ac
libphobos/libdruntime/Makefile.in
libphobos/libdruntime/config/x86/switchcontext.S
libphobos/libdruntime/core/thread.d
libphobos/libdruntime/gcc/config.d.in
libphobos/src/Makefile.in
libphobos/testsuite/Makefile.in