summaryrefslogtreecommitdiff
path: root/tools/objtool/arch
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-06-15 00:15:38 +0300
committerBorislav Petkov <bp@suse.de>2022-06-27 11:33:58 +0300
commitd9e9d2300681d68a775c28de6aa6e5290ae17796 (patch)
treef67d4b228c6c59ba6ec95aa48099040dbbb6fc3b /tools/objtool/arch
parent15e67227c49a57837108acfe1c80570e1bd9f962 (diff)
downloadlinux-d9e9d2300681d68a775c28de6aa6e5290ae17796.tar.xz
x86,objtool: Create .return_sites
Find all the return-thunk sites and record them in a .return_sites section such that the kernel can undo this. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'tools/objtool/arch')
-rw-r--r--tools/objtool/arch/x86/decode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index 8b990a52aada..c260006106be 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -787,3 +787,8 @@ bool arch_is_retpoline(struct symbol *sym)
{
return !strncmp(sym->name, "__x86_indirect_", 15);
}
+
+bool arch_is_rethunk(struct symbol *sym)
+{
+ return !strcmp(sym->name, "__x86_return_thunk");
+}