diff options
author | Peter Zijlstra <peterz@infradead.org> | 2018-01-16 04:38:09 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-02-21 03:05:03 -0500 |
commit | bd89004f6305cbf7352238f61da093207ee518d6 (patch) | |
tree | 97e88ee28f5b291c1667d82300da187c9fed0260 | |
parent | 3010a0663fd949d122eca0561b06b0a9453f7866 (diff) |
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>
-rw-r--r-- | arch/x86/kernel/head_64.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 04a625f0fcda..0f545b3cf926 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/nops.h> | 23 | #include <asm/nops.h> |
24 | #include "../entry/calling.h" | 24 | #include "../entry/calling.h" |
25 | #include <asm/export.h> | 25 | #include <asm/export.h> |
26 | #include <asm/nospec-branch.h> | ||
26 | 27 | ||
27 | #ifdef CONFIG_PARAVIRT | 28 | #ifdef CONFIG_PARAVIRT |
28 | #include <asm/asm-offsets.h> | 29 | #include <asm/asm-offsets.h> |
@@ -134,6 +135,7 @@ ENTRY(secondary_startup_64) | |||
134 | 135 | ||
135 | /* Ensure I am executing from virtual addresses */ | 136 | /* Ensure I am executing from virtual addresses */ |
136 | movq $1f, %rax | 137 | movq $1f, %rax |
138 | ANNOTATE_RETPOLINE_SAFE | ||
137 | jmp *%rax | 139 | jmp *%rax |
138 | 1: | 140 | 1: |
139 | UNWIND_HINT_EMPTY | 141 | UNWIND_HINT_EMPTY |