mirror-linux/drivers/base
Borislav Petkov (AMD) ac41e90d8d 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 20:03:50 +02:00
..
firmware_loader
power PM: sleep: wakeirq: fix wake irq arming 2023-08-03 10:24:16 +02:00
regmap regmap: Account for register length in SMBus I/O limits 2023-07-27 08:50:26 +02:00
test
Kconfig
Makefile
arch_numa.c
arch_topology.c
attribute_container.c
auxiliary.c
base.h
bus.c
cacheinfo.c drivers: base: cacheinfo: Fix shared_cpu_map changes in event of CPU hotplug 2023-06-09 10:34:17 +02:00
class.c
component.c drivers: base: component: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:39 +01:00
container.c
core.c
cpu.c x86/srso: Add a Speculative RAS Overflow mitigation 2023-08-08 20:03:50 +02:00
dd.c driver core: Don't require dynamic_debug for initcall_debug probe timing 2023-05-01 08:26:27 +09:00
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
map.c
memory.c
module.c
node.c
physical_location.c
physical_location.h
pinctrl.c
platform-msi.c
platform.c platform: Provide a remove callback that returns no value 2023-05-24 17:32:43 +01:00
property.c drivers: fwnode: fix fwnode_irq_get[_byname]() 2023-07-19 16:21:57 +02:00
soc.c
swnode.c
syscore.c
topology.c
trace.c
trace.h
transport_class.c