linux-stable/tools
Peter Zijlstra 5de0a325c4 objtool/x86: Fix SRSO mess
commit 4ae68b26c3 upstream.

Objtool --rethunk does two things:

 - it collects all (tail) call's of __x86_return_thunk and places them
   into .return_sites. These are typically compiler generated, but
   RET also emits this same.

 - it fudges the validation of the __x86_return_thunk symbol; because
   this symbol is inside another instruction, it can't actually find
   the instruction pointed to by the symbol offset and gets upset.

Because these two things pertained to the same symbol, there was no
pressing need to separate these two separate things.

However, alas, along comes SRSO and more crazy things to deal with
appeared.

The SRSO patch itself added the following symbol names to identify as
rethunk:

  'srso_untrain_ret', 'srso_safe_ret' and '__ret'

Where '__ret' is the old retbleed return thunk, 'srso_safe_ret' is a
new similarly embedded return thunk, and 'srso_untrain_ret' is
completely unrelated to anything the above does (and was only included
because of that INT3 vs UD2 issue fixed previous).

Clear things up by adding a second category for the embedded instruction
thing.

Fixes: fb3bd914b3 ("x86/srso: Add a Speculative RAS Overflow mitigation")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230814121148.704502245@infradead.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:18:10 +02:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 19:58:33 +02:00
bootconfig bootconfig: Fix testcase to increase max node 2023-03-30 12:47:47 +02:00
bpf bpftool: JIT limited misreported as negative value on aarch64 2023-07-23 13:46:50 +02:00
build tools build: Add feature test for init_disassemble_info API changes 2023-03-17 08:49:03 +01:00
cgroup
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:59:12 +02:00
hv
iio tools/iio/iio_utils:fix memory leak 2023-03-11 13:57:34 +01:00
include x86/ibt: Add ANNOTATE_NOENDBR 2023-08-26 14:23:39 +02:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:07:51 +02:00
laptop
leds
lib libbpf: fix offsetof() and container_of() to work with CO-RE 2023-07-23 13:46:49 +02:00
memory-model
objtool objtool/x86: Fix SRSO mess 2023-08-30 16:18:10 +02:00
pci
pcmcia
perf perf test uprobe_from_different_cu: Skip if there is no gcc 2023-08-11 15:13:50 +02:00
power cpupower: Make TSC read per CPU for Mperf monitor 2023-05-24 17:36:49 +01:00
rcu
scripts
spi
testing selftests: mirror_gre_changes: Tighten up the TTL test match 2023-08-26 14:23:33 +02:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-17 14:24:15 +02:00
time
tracing
usb
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:57:01 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:28:42 +01:00
wmi
Makefile