mirror_ubuntu-kernels/tools/objtool
Peter Zijlstra 2105a92748 static_call,x86: Robustify trampoline patching
Add a few signature bytes after the static call trampoline and verify
those bytes match before patching the trampoline. This avoids patching
random other JMPs (such as CFI jump-table entries) instead.

These bytes decode as:

   d:   53                      push   %rbx
   e:   43 54                   rex.XB push %r12

And happen to spell "SCT".

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20211030074758.GT174703@worktop.programming.kicks-ass.net
2021-11-11 13:09:31 +01:00
..
arch/x86
Documentation
include/objtool
.gitignore
Build
builtin-check.c
builtin-orc.c
check.c static_call,x86: Robustify trampoline patching 2021-11-11 13:09:31 +01:00
elf.c
Makefile
objtool.c
orc_dump.c
orc_gen.c
special.c
sync-check.sh
weak.c