diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-03-08 18:30:55 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-03-15 12:32:47 +0300 |
commit | 89bc853eae4ad125030ef99f207ba76c2f00a26e (patch) | |
tree | 7f3aa0f233858f04ee61872e4ae3a795433b4fa4 /tools/objtool/include | |
parent | 08f87a93c8ec709698edba66a5167077181fc978 (diff) | |
download | linux-89bc853eae4ad125030ef99f207ba76c2f00a26e.tar.xz |
objtool: Find unused ENDBR instructions
Find all ENDBR instructions which are never referenced and stick them
in a section such that the kernel can poison them, sealing the
functions from ever being an indirect call target.
This removes about 1-in-4 ENDBR instructions.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154319.763643193@infradead.org
Diffstat (limited to 'tools/objtool/include')
-rw-r--r-- | tools/objtool/include/objtool/objtool.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/objtool.h b/tools/objtool/include/objtool/objtool.h index fa3c7fa1ca9c..7a5c13a78f87 100644 --- a/tools/objtool/include/objtool/objtool.h +++ b/tools/objtool/include/objtool/objtool.h @@ -26,6 +26,7 @@ struct objtool_file { struct list_head retpoline_call_list; struct list_head static_call_list; struct list_head mcount_loc_list; + struct list_head endbr_list; bool ignore_unreachables, c_file, hints, rodata; unsigned int nr_endbr; |