mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
objtool: Fix retpoline detection in asm code
The JMP_NOSPEC macro branches to __x86_retpoline_*() rather than the
__x86_indirect_thunk_*() wrappers used by C code. Detect jumps to
__x86_retpoline_*() as retpoline dynamic jumps.
Presumably this doesn't trigger a user-visible bug. I only found it
when testing vmlinux.o validation.
Fixes: 39b735332c ("objtool: Detect jumps to retpoline thunks")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/31f5833e2e4f01e3d755889ac77e3661e906c09f.1611263461.git.jpoimboe@redhat.com
This commit is contained in:
@@ -48,7 +48,7 @@ bool arch_support_alt_relocation(struct special_alt *special_alt,
|
||||
* replacement group.
|
||||
*/
|
||||
return insn->offset == special_alt->new_off &&
|
||||
(insn->type == INSN_CALL || is_static_jump(insn));
|
||||
(insn->type == INSN_CALL || is_jump(insn));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user