WSL2-Linux-Kernel/tools/objtool
Peter Zijlstra 7a53f40890 objtool: Fix SLS validation for kcov tail-call replacement
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
2022-04-05 10:24:40 +02:00
..
Documentation
arch/x86 objtool: Add IBT/ENDBR decoding 2022-03-15 10:32:46 +01:00
include/objtool objtool: Find unused ENDBR instructions 2022-03-15 10:32:47 +01:00
.gitignore
Build
Makefile kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
builtin-check.c objtool: Validate IBT assumptions 2022-03-15 10:32:46 +01:00
builtin-orc.c
check.c objtool: Fix SLS validation for kcov tail-call replacement 2022-04-05 10:24:40 +02:00
elf.c objtool: Ignore extra-symbol code 2022-03-15 10:32:43 +01:00
objtool.c objtool: Find unused ENDBR instructions 2022-03-15 10:32:47 +01:00
orc_dump.c
orc_gen.c
special.c
sync-check.sh
weak.c