llvm-project/llvm/lib
serge_sans_paille e229017732 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 better option
handling and more portable testing

Differential Revision: https://reviews.llvm.org/D68720
2020-02-08 13:31:52 +01:00
..
Analysis [ValueTracking] usub(a, b) cannot overflow if a >= b. 2020-02-07 10:41:18 +00:00
AsmParser Revert "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-05 19:27:32 -08:00
BinaryFormat DWARFDebugLine.cpp: Format unknown line number standard opcodes 2020-01-15 10:45:50 -05:00
Bitcode Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Bitstream [Bitstream] Delete skipAbbreviatedField which duplicates readAbbreviatedField 2019-12-25 18:55:02 -08:00
CodeGen [LegalizeDAG][X86][AMDGPU] Use ANY_EXTEND instead of ZERO_EXTEND when promoting ISD::CTTZ/CTTZ_ZERO_UNDEF. 2020-02-07 22:25:56 -08:00
DWARFLinker [dsymutil] Delete unneeded parameter Triple from DWARFLinker 2020-02-07 11:33:27 -08:00
DebugInfo Use heterogenous lookup for std;:map<std::string with a StringRef. NFCI. 2020-02-08 13:28:29 +01:00
Demangle
ExecutionEngine Make StringRef's std::string conversion operator explicit 2020-02-01 15:43:45 +01:00
Frontend [OpenMP] Add Flush directive to OpenMPIRBuilder 2020-02-04 22:48:02 +00:00
FuzzMutate Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Fuzzer
IR [X86] Correct the implementation of the avx512 masked fmsubadd autoupgrade code to not leave the negate unconnected. 2020-02-07 15:27:05 -08:00
IRReader
LTO [LLD][ELF] Add time-trace to ELF LLD 2020-02-06 12:14:13 +00:00
LineEditor Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Linker IR Linking: Support merging Warning+Max module metadata flags 2020-02-07 16:29:58 -08:00
MC [AsmPrinter] Print FP constant in hexadecimal form instead 2020-02-07 16:00:55 +00:00
MCA [MCA] Remove verification check on MayLoad and MayStore. NFCI 2020-02-05 13:50:01 +00:00
Object [XCOFF][AIX] Support basic relocation type on AIX 2020-01-30 15:59:09 +00:00
ObjectYAML [yaml2obj] - Change NameIndex to StName for Symbol. 2020-02-06 12:04:19 +03:00
Option Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Passes Revert "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-05 19:27:32 -08:00
ProfileData [llvm] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:16:46 -08:00
Remarks [Remarks] Extend the RemarkStreamer to support other emitters 2020-02-04 17:16:02 -08:00
Support [Support] When using SEH, create a impl instance for CrashRecoveryContext. NFCI. 2020-02-06 19:23:49 -05:00
TableGen [TableGen] Fix spurious type error in bit assignment. 2020-02-07 15:11:42 +00:00
Target Support -fstack-clash-protection for x86 2020-02-08 13:31:52 +01:00
Testing
TextAPI Another round of GCC5 fixes. 2020-01-29 02:09:24 +01:00
ToolDrivers [llvm] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:16:46 -08:00
Transforms [ObjC][ARC] Keep track of phis that have been discovered to avoid an 2020-02-07 20:33:11 -08:00
WindowsManifest
XRay Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CMakeLists.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00
LLVMBuild.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00