Star64_linux/tools
Peter Zijlstra 98de32a445 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-09-05 01:25:02 +08:00
..
accounting SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-20 16:01:29 +08:00
bootconfig bootconfig: Fix testcase to increase max node 2023-04-19 18:01:01 +08:00
bpf bpftool: JIT limited misreported as negative value on aarch64 2023-08-20 15:24:19 +08:00
build tools build: Add feature test for init_disassemble_info API changes 2023-04-19 18:00:47 +08:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-04-23 14:42:40 -07:00
debugging tools: Fix "the the" in a message in kernel-chktaint 2021-06-13 17:01:17 -06:00
edid
firewire treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
firmware Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-08-20 15:21:37 +08:00
hv tools: hv: change http to https in hv_kvp_daemon.c 2020-07-06 10:46:23 +00:00
iio tools/iio/iio_utils:fix memory leak 2023-04-19 18:00:33 +08:00
include x86/ibt: Add ANNOTATE_NOENDBR 2023-08-28 23:27:07 +08:00
io_uring tools/io_uring/io_uring-cp: sync with liburing example 2021-08-13 08:58:11 -06:00
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2023-04-19 17:51:56 +08:00
laptop change email address for Pali Rohár 2020-04-10 15:36:22 -07:00
leds .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
lib libbpf: fix offsetof() and container_of() to work with CO-RE 2023-08-20 15:24:18 +08:00
memory-model tools/memory-model: Document data_race(READ_ONCE()) 2021-07-27 11:48:55 -07:00
objtool objtool/x86: Fix SRSO mess 2023-09-05 01:25:02 +08:00
pci tools: PCI: Zero-initialize param 2021-08-05 11:01:30 +01:00
pcmcia .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
perf perf test uprobe_from_different_cu: Skip if there is no gcc 2023-08-20 16:01:32 +08:00
power cpupower: Make TSC read per CPU for Mperf monitor 2023-06-06 18:39:35 +08:00
rcu
scripts tools build: Fix quiet cmd indentation 2021-05-17 12:10:03 +09:00
spi spi: tools: make a symbolic link to the header file spi.h 2021-04-22 16:30:39 +01:00
testing selftests: mirror_gre_changes: Tighten up the TTL test match 2023-08-28 23:27:02 +08:00
thermal/tmon tools/thermal: Fix possible path truncations 2023-04-19 17:52:48 +08:00
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2023-04-19 16:57:13 +08:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-04-19 17:59:24 +08:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2023-04-19 17:56:50 +08:00
wmi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile tracing/tools: Add the latency-collector to tools directory 2021-02-12 11:52:59 -05:00