From b68b9907069a8d3a65bc16a35360bf8f8603c8fa Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 17 Jul 2019 20:36:57 -0500 Subject: objtool: Support conditional retpolines A Clang-built kernel is showing the following warning: arch/x86/kernel/platform-quirks.o: warning: objtool: x86_early_init_platform_quirks()+0x84: unreachable instruction That corresponds to this code: 7e: 0f 85 00 00 00 00 jne 84 80: R_X86_64_PC32 __x86_indirect_thunk_r11-0x4 84: c3 retq This is a conditional retpoline sibling call, which is now possible thanks to retpolines. Objtool hasn't seen that before. It's incorrectly interpreting the conditional jump as an unconditional dynamic jump. Reported-by: Nick Desaulniers Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/30d4c758b267ef487fb97e6ecb2f148ad007b554.1563413318.git.jpoimboe@redhat.com --- tools/objtool/arch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/objtool/arch.h') diff --git a/tools/objtool/arch.h b/tools/objtool/arch.h index 50448c0c4bca..ced3765c4f44 100644 --- a/tools/objtool/arch.h +++ b/tools/objtool/arch.h @@ -15,6 +15,7 @@ enum insn_type { INSN_JUMP_CONDITIONAL, INSN_JUMP_UNCONDITIONAL, INSN_JUMP_DYNAMIC, + INSN_JUMP_DYNAMIC_CONDITIONAL, INSN_CALL, INSN_CALL_DYNAMIC, INSN_RETURN, -- cgit v1.2.3-59-g8ed1b