linux-stable/tools
Peter Zijlstra 53a4a15dd6 objtool: Fix SLS validation for kcov tail-call replacement
commit 7a53f40890 upstream.

Since not all compilers have a function attribute to disable KCOV
instrumentation, objtool can rewrite KCOV instrumentation in noinstr
functions as per commit:

  f56dae88a8 ("objtool: Handle __sanitize_cov*() tail calls")

However, this has subtle interaction with the SLS validation from
commit:

  1cc1e4c8aa ("objtool: Add straight-line-speculation validation")

In that when a tail-call instrucion is replaced with a RET an
additional INT3 instruction is also written, but is not represented in
the decoded instruction stream.

This then leads to false positive missing INT3 objtool warnings in
noinstr code.

Instead of adding additional struct instruction objects, mark the RET
instruction with retpoline_safe to suppress the warning (since we know
there really is an INT3).

Fixes: 1cc1e4c8aa ("objtool: Add straight-line-speculation validation")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220323230712.GA8939@worktop.programming.kicks-ass.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13 19:27:42 +02:00
..
accounting delayacct: track delays from memory compact 2022-01-20 08:52:55 +02:00
arch tools headers cpufeatures: Sync with the kernel sources 2022-03-12 10:38:05 -03:00
bootconfig bootconfig: Cleanup dummy headers in tools/bootconfig 2021-10-10 22:16:02 -04:00
bpf bpftool: Fix print error when show bpf map 2022-04-08 13:58:22 +02:00
build tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts 2022-04-13 19:27:41 +02:00
cgroup tools/cgroup/slabinfo: update to work with struct slab 2022-02-21 11:34:49 +01:00
counter tools/counter: Create Counter tools 2021-10-17 10:54:16 +01:00
debugging
edid
firewire
firmware
gpio
hv
iio iio: event_monitor: Flush output on event 2021-12-16 12:20:35 +00:00
include bpf: Fix comment for helper bpf_current_task_under_cgroup() 2022-04-08 13:59:00 +02:00
io_uring
kvm/kvm_stat KVM: kvm_stat: do not show halt_wait_ns 2021-10-18 14:07:18 -04:00
laptop
leds
lib libbpf: Fix accessing the first syscall argument on s390 2022-04-13 19:27:14 +02:00
memory-model tools/memory-model: litmus: Add two tests for unlock(A)+lock(B) ordering 2021-11-30 17:47:08 -08:00
objtool objtool: Fix SLS validation for kcov tail-call replacement 2022-04-13 19:27:42 +02:00
pci
pcmcia
perf tools build: Filter out options and warnings not supported by clang 2022-04-13 19:27:41 +02:00
power More ACPI updates for 5.17-rc1 2022-01-18 08:51:51 +02:00
rcu
scripts tools: Ignore errors from `which' when searching a GCC toolchain 2022-02-01 23:04:12 +01:00
spi
testing selftests/bpf: Fix u8 narrow load checks for bpf_sk_lookup remote_port 2022-04-13 19:27:40 +02:00
thermal/tmon thermal: tools: tmon: remove unneeded local variable 2021-11-24 17:26:13 +01:00
time
tracing rtla/osnoise: Fix osnoise hist stop tracing message 2022-04-08 13:57:53 +02:00
usb
virtio tools/virtio: handle fallout from folio work 2022-03-06 06:06:50 -05:00
vm tools/vm/page-types.c: print file offset in hexadecimal 2021-11-06 13:30:40 -07:00
wmi
Makefile tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00