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

x86/boot, objtool: Annotate indirect jump in secondary_startup_64()

The objtool retpoline validation found this indirect jump. Seeing how
it's on CPU bringup before we run userspace it should be safe, annotate
it.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Peter Zijlstra and committed by
Ingo Molnar
bd89004f 3010a066

+2
+2
arch/x86/kernel/head_64.S
··· 23 23 #include <asm/nops.h> 24 24 #include "../entry/calling.h" 25 25 #include <asm/export.h> 26 + #include <asm/nospec-branch.h> 26 27 27 28 #ifdef CONFIG_PARAVIRT 28 29 #include <asm/asm-offsets.h> ··· 135 134 136 135 /* Ensure I am executing from virtual addresses */ 137 136 movq $1f, %rax 137 + ANNOTATE_RETPOLINE_SAFE 138 138 jmp *%rax 139 139 1: 140 140 UNWIND_HINT_EMPTY