diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-06-14 23:15:38 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-06-27 10:33:58 +0200 |
commit | d9e9d2300681d68a775c28de6aa6e5290ae17796 (patch) | |
tree | f67d4b228c6c59ba6ec95aa48099040dbbb6fc3b /tools/objtool/objtool.c | |
parent | x86: Undo return-thunk damage (diff) | |
download | linux-d9e9d2300681d68a775c28de6aa6e5290ae17796.tar.xz linux-d9e9d2300681d68a775c28de6aa6e5290ae17796.zip |
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 '')
-rw-r--r-- | tools/objtool/objtool.c | 1 |
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); |