diff options
| author | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2017-11-26 13:02:45 +0000 |
|---|---|---|
| committer | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2017-11-26 13:02:45 +0000 |
| commit | fa582b075c4762829eea59444624c9d90e6b1113 (patch) | |
| tree | ace7d05b3f111e55b451061d5b61cfd34b3340aa /llvm/lib/Target/X86/X86Subtarget.h | |
| parent | fec21ec0c6257eb24290c483b03b4fd9e6a9d0d1 (diff) | |
| download | bcm5719-llvm-fa582b075c4762829eea59444624c9d90e6b1113.tar.gz bcm5719-llvm-fa582b075c4762829eea59444624c9d90e6b1113.zip | |
Control-Flow Enforcement Technology - Shadow Stack support (LLVM side)
Shadow stack solution introduces a new stack for return addresses only.
The HW has a Shadow Stack Pointer (SSP) that points to the next return address.
If we return to a different address, an exception is triggered.
The shadow stack is managed using a series of intrinsics that are introduced in this patch as well as the new register (SSP).
The intrinsics are mapped to new instruction set that implements CET mechanism.
The patch also includes initial infrastructure support for IBT.
For more information, please see the following:
https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf
Differential Revision: https://reviews.llvm.org/D40223
Change-Id: I4daa1f27e88176be79a4ac3b4cd26a459e88fed4
llvm-svn: 318996
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
| -rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 740b9ddba09..be4d46c470d 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -320,6 +320,14 @@ protected: /// Processor supports MPX - Memory Protection Extensions bool HasMPX; + /// Processor supports CET SHSTK - Control-Flow Enforcement Technology + /// using Shadow Stack + bool HasSHSTK; + + /// Processor supports CET IBT - Control-Flow Enforcement Technology + /// using Indirect Branch Tracking + bool HasIBT; + /// Processor has Software Guard Extensions bool HasSGX; @@ -548,6 +556,8 @@ public: bool hasVNNI() const { return HasVNNI; } bool hasBITALG() const { return HasBITALG; } bool hasMPX() const { return HasMPX; } + bool hasSHSTK() const { return HasSHSTK; } + bool hasIBT() const { return HasIBT; } bool hasCLFLUSHOPT() const { return HasCLFLUSHOPT; } bool hasCLWB() const { return HasCLWB; } |

