Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

objtool: Fix function fallthrough detection for vmlinux

Objtool's function fallthrough detection only works on C objects.
The distinction between C and assembly objects no longer makes sense
with objtool running on vmlinux.o.

Now that copy_user_64.S has been fixed up, and an objtool sibling call
detection bug has been fixed, the asm code is in "compliance" and this
hack is no longer needed. Remove it.

Fixes: ed53a0d97192 ("x86/alternative: Use .ibt_endbr_seal to seal indirect calls")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/b434cff98eca3a60dcc64c620d7d5d405a0f441c.1649718562.git.jpoimboe@redhat.com

authored by

Josh Poimboeuf and committed by
Peter Zijlstra
08feafe8 34c861e8

+2 -3
+1 -1
tools/objtool/check.c
··· 3310 3310 while (1) { 3311 3311 next_insn = next_insn_to_validate(file, insn); 3312 3312 3313 - if (file->c_file && func && insn->func && func != insn->func->pfunc) { 3313 + if (func && insn->func && func != insn->func->pfunc) { 3314 3314 WARN("%s() falls through to next function %s()", 3315 3315 func->name, insn->func->name); 3316 3316 return 1;
+1 -1
tools/objtool/include/objtool/objtool.h
··· 27 27 struct list_head static_call_list; 28 28 struct list_head mcount_loc_list; 29 29 struct list_head endbr_list; 30 - bool ignore_unreachables, c_file, hints, rodata; 30 + bool ignore_unreachables, hints, rodata; 31 31 32 32 unsigned int nr_endbr; 33 33 unsigned int nr_endbr_int;
-1
tools/objtool/objtool.c
··· 129 129 INIT_LIST_HEAD(&file.static_call_list); 130 130 INIT_LIST_HEAD(&file.mcount_loc_list); 131 131 INIT_LIST_HEAD(&file.endbr_list); 132 - file.c_file = !vmlinux && find_section_by_name(file.elf, ".comment"); 133 132 file.ignore_unreachables = no_unreachable; 134 133 file.hints = false; 135 134