aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2023-12-10 07:21:36 +0100
committerBorislav Petkov (AMD) <bp@alien8.de>2023-12-10 20:49:20 +0100
commitda0fe6e68e104f79c1fef5c62a17bdd1634ea61c (patch)
tree4230eed7ba62d514a4052f3cfbc47027e39a4a1a /scripts/gdb/linux
parent9824b00c2b58f9e1072ef3ece571a2cfc71089d4 (diff)
x86/alternative: Add indirect call patching
In order to prepare replacing of paravirt patching with alternative patching, add the capability to replace an indirect call with a direct one. This is done via a new flag ALT_FLAG_CALL as the target of the CALL instruction needs to be evaluated using the value of the location addressed by the indirect call. For convenience, add a macro for a default CALL instruction. In case it is being used without the new flag being set, it will result in a BUG() when being executed. As in most cases, the feature used will be X86_FEATURE_ALWAYS so add another macro ALT_CALL_ALWAYS usable for the flags parameter of the ALTERNATIVE macros. For a complete replacement, handle the special cases of calling a nop function and an indirect call of NULL the same way as paravirt does. [ bp: Massage commit message, fixup the debug output and clarify flow more. ] Co-developed-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20231210062138.2417-4-jgross@suse.com
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions