linux-stable/tools
Borislav Petkov (AMD) 3f9b7101be x86/srso: Add a Speculative RAS Overflow mitigation
Upstream commit: fb3bd914b3

Add a mitigation for the speculative return address stack overflow
vulnerability found on AMD processors.

The mitigation works by ensuring all RET instructions speculate to
a controlled location, similar to how speculation is controlled in the
retpoline sequence.  To accomplish this, the __x86_return_thunk forces
the CPU to mispredict every function return using a 'safe return'
sequence.

To ensure the safety of this mitigation, the kernel must ensure that the
safe return sequence is itself free from attacker interference.  In Zen3
and Zen4, this is accomplished by creating a BTB alias between the
untraining function srso_untrain_ret_alias() and the safe return
function srso_safe_ret_alias() which results in evicting a potentially
poisoned BTB entry and using that safe one for all function returns.

In older Zen1 and Zen2, this is accomplished using a reinterpretation
technique similar to Retbleed one: srso_untrain_ret() and
srso_safe_ret().

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-08 19:57:40 +02:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 19:57:39 +02:00
bootconfig bootconfig: Fix testcase to increase max node 2023-04-05 11:23:34 +02:00
bpf bpftool: JIT limited misreported as negative value on aarch64 2023-07-27 08:43:37 +02:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-25 11:38:01 +02:00
cgroup
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:45:35 +02:00
hv
iio tools/iio/iio_utils:fix memory leak 2023-03-11 16:40:17 +01:00
include bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE 2023-07-27 08:43:37 +02:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:06:45 +02:00
laptop
leds
lib libbpf: fix offsetof() and container_of() to work with CO-RE 2023-07-27 08:43:37 +02:00
memory-model
objtool x86/srso: Add a Speculative RAS Overflow mitigation 2023-08-08 19:57:40 +02:00
pci
pcmcia
perf perf probe: Add test for regression introduced by switch to die_get_decl_file() 2023-07-27 08:44:34 +02:00
power cpupower: Make TSC read per CPU for Mperf monitor 2023-05-30 12:57:51 +01:00
scripts
spi
testing selftests: tc: add 'ct' action kconfig dep 2023-07-27 08:44:35 +02:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-21 15:16:12 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:40:56 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:55:53 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:57 +01:00
wmi
Makefile