[PATCH v2 09/10] x86: Annotate dynamic jump in head_64.S

From: Peter Zijlstra
Date: Tue Jan 16 2018 - 09:37:05 EST


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

Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
arch/x86/kernel/head_64.S | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -134,7 +134,10 @@ ENTRY(secondary_startup_64)

/* Ensure I am executing from virtual addresses */
movq $1f, %rax
- jmp *%rax
+2: jmp *%rax
+ .pushsection .discard.retpoline_safe
+ .quad 2b
+ .popsection
1:
UNWIND_HINT_EMPTY