llvm-project/llvm/test/CodeGen
Kristof Beyls 0ee176edc8 [AArch64] Introduce AArch64SLSHardeningPass, implementing hardening of RET and BR instructions.
Some processors may speculatively execute the instructions immediately
following RET (returns) and BR (indirect jumps), even though
control flow should change unconditionally at these instructions.
To avoid a potential miss-speculatively executed gadget after these
instructions leaking secrets through side channels, this pass places a
speculation barrier immediately after every RET and BR instruction.

Since these barriers are never on the correct, architectural execution
path, performance overhead of this is expected to be low.

On targets that implement that Armv8.0-SB Speculation Barrier extension,
a single SB instruction is emitted that acts as a speculation barrier.
On other targets, a DSB SYS followed by a ISB is emitted to act as a
speculation barrier.

These speculation barriers are implemented as pseudo instructions to
avoid later passes to analyze them and potentially remove them.

Even though currently LLVM does not produce BRAA/BRAB/BRAAZ/BRABZ
instructions, these are also mitigated by the pass and tested through a
MIR test.

The mitigation is off by default and can be enabled by the
harden-sls-retbr subtarget feature.

Differential Revision:  https://reviews.llvm.org/D81400
2020-06-11 07:51:17 +01:00
..
AArch64 [AArch64] Introduce AArch64SLSHardeningPass, implementing hardening of RET and BR instructions. 2020-06-11 07:51:17 +01:00
AMDGPU AMDGPU/GlobalISel: Fix porting error in 32-bit division 2020-06-10 21:48:58 -04:00
ARC
ARM [ARM][MachineOutliner] Add NoLRSave mode. 2020-06-11 08:45:46 +02:00
AVR [AVR][test] Remove test for naked function containing a return. 2020-06-09 09:06:47 +01:00
BPF [BPF] Remove unnecessary MOV_32_64 instructions 2020-06-03 08:14:54 -07:00
Generic [Tests] Migrate a number of tests to gc-live bundle representation 2020-06-05 16:44:04 -07:00
Hexagon Simplify MachineVerifier's block-successor verification. 2020-06-06 22:30:51 -04:00
Inputs
Lanai
MIR [MachineVerifier] Verify that a DBG_VALUE has a debug location 2020-05-28 13:53:40 -07:00
MSP430
Mips RegAllocFast: Record internal state based on register units 2020-06-03 16:51:46 -04:00
NVPTX
PowerPC Added test case for the patch D75866 "supporting the visibility attribute for aix assembly" 2020-06-09 16:29:28 -04:00
RISCV Add NoMerge MIFlag to avoid MIR branch folding 2020-05-29 12:31:06 -07:00
SPARC [SPARC] Lower fp16 ops to libcalls 2020-06-10 19:15:26 -07:00
SystemZ [CostModel] Unify Shuffle and InsertElement Costs 2020-06-10 09:13:34 +01:00
Thumb
Thumb2 [ARM] Add some MVE vecreduce tests. NFC 2020-06-09 12:07:19 +01:00
VE [VE] Support lowering to NND instruction 2020-06-09 10:18:14 +02:00
WebAssembly [NFC][WebAssembly] Add tests for alignment on new SIMD loads 2020-06-09 13:46:12 -07:00
WinCFGuard
WinEH
X86 [X86] Add an Unoptimized Load Value Injection (LVI) Load Hardening Pass 2020-06-10 15:31:47 -07:00
XCore