aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/include/asm/alternative.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-09-15 13:11:33 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-10-17 16:41:17 +0200
commit396e0b8e09e86440c2119d12c2101110d3cd5bf9 (patch)
tree1c1177879cb877b61d64b5851acdddb15fef01c2 /arch/x86/include/asm/alternative.h
parentkallsyms: Take callthunks into account (diff)
downloadwireguard-linux-396e0b8e09e86440c2119d12c2101110d3cd5bf9.tar.xz
wireguard-linux-396e0b8e09e86440c2119d12c2101110d3cd5bf9.zip
x86/orc: Make it callthunk aware
Callthunks addresses on the stack would confuse the ORC unwinder. Handle them correctly and tell ORC to proceed further down the stack. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220915111148.511637628@infradead.org
Diffstat (limited to 'arch/x86/include/asm/alternative.h')
-rw-r--r--arch/x86/include/asm/alternative.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index 07ac25793a3f..4b8cd256c95e 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -92,6 +92,7 @@ extern void callthunks_patch_builtin_calls(void);
extern void callthunks_patch_module_calls(struct callthunk_sites *sites,
struct module *mod);
extern void *callthunks_translate_call_dest(void *dest);
+extern bool is_callthunk(void *addr);
#else
static __always_inline void callthunks_patch_builtin_calls(void) {}
static __always_inline void
@@ -101,6 +102,10 @@ static __always_inline void *callthunks_translate_call_dest(void *dest)
{
return dest;
}
+static __always_inline bool is_callthunk(void *addr)
+{
+ return false;
+}
#endif
#ifdef CONFIG_SMP