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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user