Skip to content

Commit 64dbc12

Browse files
jpoimboeKAGA-KOKO
authored andcommitted
x86/entry/64: Use JMP instead of JMPQ
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent a205982 commit 64dbc12

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
@@ -549,7 +549,7 @@ ENTRY(interrupt_entry)
549549
UNWIND_HINT_FUNC
550550

551551
movq (%rdi), %rdi
552-
jmpq 2f
552+
jmp 2f
553553
1:
554554
FENCE_SWAPGS_KERNEL_ENTRY
555555
2:

0 commit comments

Comments
 (0)