1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/lib
Simon Dardis 8181753289 [mips] Spectre variant two mitigation for MIPSR2
This patch provides mitigation for CVE-2017-5715, Spectre variant two,
which affects the P5600 and P6600. It implements the LLVM part of
-mindirect-jump=hazard. It is _not_ enabled by default for the P5600.

The migitation strategy suggested by MIPS for these processors is to use
hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard
barrier variants of the 'jalr' and 'jr' instructions respectively.

These instructions impede the execution of instruction stream until
architecturally defined hazards (changes to the instruction stream,
privileged registers which may affect execution) are cleared. These
instructions in MIPS' designs are not speculated past.

These instructions are used with the attribute +use-indirect-jump-hazard
when branching indirectly and for indirect function calls.

These instructions are defined by the MIPS32R2 ISA, so this mitigation
method is not compatible with processors which implement an earlier
revision of the MIPS ISA.

Performance benchmarking of this option with -fpic and lld using
-z hazardplt shows a difference of overall 10%~ time increase
for the LLVM testsuite. Certain benchmarks such as methcall show a
substantially larger increase in time due to their nature.

Reviewers: atanasyan, zoran.jovanovic

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

llvm-svn: 325653
2018-02-21 00:06:53 +00:00
..
Analysis [MemoryBuiltins] Check nobuiltin status when identifying calls to free. 2018-02-20 22:00:33 +00:00
AsmParser [DebugInfo] Unify ChecksumKind and Checksum value in DIFile 2018-02-12 19:45:54 +00:00
BinaryFormat Add DWARF for discriminated unions 2018-02-06 23:45:59 +00:00
Bitcode bitcode support change for fast flags compatibility 2018-02-19 19:22:28 +00:00
CodeGen [PBQP] Fix PR33038 by pruning empty intervals in initializeGraph. 2018-02-20 22:15:09 +00:00
DebugInfo [dwarfdump] Fix spurious verification errors for DW_AT_location attributes 2018-02-17 13:06:37 +00:00
Demangle
ExecutionEngine Report fatal error in the case of out of memory 2018-02-20 05:41:26 +00:00
Fuzzer
FuzzMutate [llvm-opt-fuzzer] Add another pack of passes for continuous fuzzing 2018-02-19 11:57:07 +00:00
IR [InstCombine] fold fdiv with non-splat divisor to fmul: X/C --> X * (1/C) 2018-02-20 16:08:15 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker [ThinLTO] Import global variables 2018-02-16 08:11:04 +00:00
LTO [LTO] Remove unused Path parameter to AddBufferFn 2018-02-20 20:21:53 +00:00
MC [MC] - Don't crash on unclosed frame. 2018-02-20 09:04:13 +00:00
Object Report fatal error in the case of out of memory 2018-02-20 05:41:26 +00:00
ObjectYAML AMDGPU: Bring elf flags in sync with the spec 2018-02-16 22:33:59 +00:00
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
Passes Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
ProfileData
Support Report fatal error in the case of out of memory 2018-02-20 05:41:26 +00:00
TableGen [tablegen] Fixed few !foreach evaluation issues. 2018-02-09 18:37:55 +00:00
Target [mips] Spectre variant two mitigation for MIPSR2 2018-02-21 00:06:53 +00:00
Testing
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [InstCombine] C / -X --> -C / X 2018-02-21 00:01:45 +00:00
WindowsManifest
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt
LLVMBuild.txt