Skip to content

Commit 49e1ce9

Browse files
jpoimboeshiloong
authored andcommitted
x86/entry/64: Use JMP instead of JMPQ
commit 64dbc12 upstream. Somehow the swapgs mitigation entry code patch ended up with a JMPQ instruction instead of JMP, where only the short jump is needed. Some assembler versions apparently fail to optimize JMPQ into a two-byte JMP when possible, instead always using a 7-byte JMP with relocation. For some reason that makes the entry code explode with a #GP during boot. Change it back to "JMP" as originally intended. Fixes: 18ec54f ("x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations") Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com> Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
1 parent 12351a6 commit 49e1ce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/entry/entry_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ ENTRY(interrupt_entry)
600600
UNWIND_HINT_FUNC
601601

602602
movq (%rdi), %rdi
603-
jmpq 2f
603+
jmp 2f
604604
1:
605605
FENCE_SWAPGS_KERNEL_ENTRY
606606
2:

0 commit comments

Comments
 (0)