llvm-project/clang/lib/Driver
serge_sans_paille e67cbac812 Support -fstack-clash-protection for x86
Implement protection against the stack clash attack [0] through inline stack
probing.

Probe stack allocation every PAGE_SIZE during frame lowering or dynamic
allocation to make sure the page guard, if any, is touched when touching the
stack, in a similar manner to GCC[1].

This extends the existing `probe-stack' mechanism with a special value `inline-asm'.
Technically the former uses function call before stack allocation while this
patch provides inlined stack probes and chunk allocation.

Only implemented for x86.

[0] https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt
[1] https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00556.html

This a recommit of 39f50da2a3 with proper LiveIn
declaration, better option handling and more portable testing.

Differential Revision: https://reviews.llvm.org/D68720
2020-02-09 10:42:45 +01:00
..
ToolChains Support -fstack-clash-protection for x86 2020-02-09 10:42:45 +01:00
Action.cpp [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries 2019-10-09 20:42:58 +00:00
CMakeLists.txt [NFC] Move OptionUtils from Basic to Driver 2019-12-23 08:11:23 -05:00
Compilation.cpp Re-land "[Clang][Driver] Remove -M group options ..." and "[Clang] Avoid crashing when generating crash diagnostics when '#pragma clang __debug ..." 2020-02-07 09:51:09 -05:00
DarwinSDKInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Distro.cpp [Clang] Bypass distro detection on non-Linux hosts 2019-11-28 17:02:06 -05:00
Driver.cpp [clang][driver] Fix null pointer dereference warning inside PrintActions1 (PR43462) 2020-02-05 15:32:18 +00:00
DriverOptions.cpp [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00
InputInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Job.cpp [PATCH] Reland [Clang] Un-break scan-build after integrated-cc1 change 2020-01-21 17:03:00 -05:00
Multilib.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptionUtils.cpp [NFC] Move OptionUtils from Basic to Driver 2019-12-23 08:11:23 -05:00
Phases.cpp [clang][ifs] Clang Interface Stubs ToolChain plumbing. 2019-10-08 15:23:14 +00:00
SanitizerArgs.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Tool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ToolChain.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Types.cpp [clang][IFS] Driver Pipeline: generate stubs after standard pipeline (3) 2019-11-20 16:22:50 -05:00
XRayArgs.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00