summaryrefslogtreecommitdiffstats
path: root/tools/objtool/objtool.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-06-14 23:15:38 +0200
committerBorislav Petkov <bp@suse.de>2022-06-27 10:33:58 +0200
commitd9e9d2300681d68a775c28de6aa6e5290ae17796 (patch)
treef67d4b228c6c59ba6ec95aa48099040dbbb6fc3b /tools/objtool/objtool.c
parent15e67227c49a57837108acfe1c80570e1bd9f962 (diff)
downloadlinux-d9e9d2300681d68a775c28de6aa6e5290ae17796.tar.bz2
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/objtool.c')
-rw-r--r--tools/objtool/objtool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index 512669ce064c..a7ecc32e3512 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -102,6 +102,7 @@ struct objtool_file *objtool_open_read(const char *_objname)
INIT_LIST_HEAD(&file.insn_list);
hash_init(file.insn_hash);
INIT_LIST_HEAD(&file.retpoline_call_list);
+ INIT_LIST_HEAD(&file.return_thunk_list);
INIT_LIST_HEAD(&file.static_call_list);
INIT_LIST_HEAD(&file.mcount_loc_list);
INIT_LIST_HEAD(&file.endbr_list);