1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/lib
Chandler Carruth fb4c3562b1 [x86/SLH] Teach SLH to harden against the "ret2spec" attack by
implementing the proposed mitigation technique described in the original
design document.

The idea is to check after calls that the return address used to arrive
at that location is in fact the correct address. In the event of
a mis-predicted return which reaches a *valid* return but not the
*correct* return, this will detect the mismatch much like it would
a mispredicted conditional branch.

This is the last published attack vector that I am aware of in the
Spectre v1 space which is not mitigated by SLH+retpolines. However,
don't read *too* much into that: this is an area of ongoing research
where we expect more issues to be discovered in the future, and it also
makes no attempt to mitigate Spectre v4. Still, this is an important
completeness bar for SLH.

The change here is of course delightfully simple. It was predicated on
cutting support for post-instruction symbols into LLVM which was not at
all simple. Many thanks to Hal Finkel, Reid Kleckner, and Justin Bogner
who helped me figure out how to do a bunch of the complex changes
involved there.

Differential Revision: https://reviews.llvm.org/D50837

llvm-svn: 341358
2018-09-04 10:59:10 +00:00
..
Analysis [NFC] Optionally pass a function to emitInstrCountChangedRemark 2018-08-31 20:54:37 +00:00
AsmParser [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
BinaryFormat Fix undefined behavior in r340457 2018-08-23 02:51:09 +00:00
Bitcode [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
CodeGen DAG: Handle extract_vector_elt in isKnownNeverNaN 2018-09-03 14:01:03 +00:00
DebugInfo [DebugInfo] Have the verifier accept missing linkage names. 2018-09-03 12:12:17 +00:00
Demangle Remove some debugging code that was accidentally left in. 2018-08-30 21:00:57 +00:00
ExecutionEngine clang-format r341282. 2018-09-02 01:29:29 +00:00
Fuzzer
FuzzMutate [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
IR [PassTiming] reporting time-passes separately for multiple pass instances of the same pass 2018-09-04 06:12:28 +00:00
IRReader
LineEditor
Linker [NFC] Remove an empty line. 2018-07-27 06:50:45 +00:00
LTO Remove trailing space 2018-07-30 19:41:25 +00:00
MC [MC] - ConstantPools.cpp: Style consistency, remove redundant braces. NFC. 2018-09-03 03:48:39 +00:00
Object [Wasm] Add missing EOF checks for floats 2018-08-31 14:54:01 +00:00
ObjectYAML [yaml2obj] - Add a support for changing EntSize. 2018-08-07 08:11:38 +00:00
Option Revert r341329 due to MSAN error 2018-09-03 18:13:46 +00:00
Passes Revert r340922 "[GVNHoist] Re-enable GVNHoist by default" 2018-08-29 13:00:55 +00:00
ProfileData [Coverage] Ignore 'unused' functions with non-zero execution counts 2018-08-07 22:25:36 +00:00
Support Do not leak the Mach host port in sys::getHostCPUName() 2018-09-04 10:54:09 +00:00
TableGen Remove trailing space 2018-07-30 19:41:25 +00:00
Target [x86/SLH] Teach SLH to harden against the "ret2spec" attack by 2018-09-04 10:59:10 +00:00
Testing
ToolDrivers Give llvm-lib rudimentary help output. 2018-07-14 02:29:44 +00:00
Transforms [InstCombine] Fold icmp ugt/ult (add nuw X, C2), C --> icmp ugt/ult X, (C - C2) 2018-09-04 10:29:48 +00:00
WindowsManifest
XRay [XRay] Update RecordInitializer for PIDRecord 2018-08-31 20:02:55 +00:00
CMakeLists.txt
LLVMBuild.txt