]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
x86/entry/64: Use JMP instead of JMPQ
authorJosh Poimboeuf <jpoimboe@redhat.com>
Mon, 15 Jul 2019 16:51:39 +0000 (11:51 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 17 Jul 2019 13:37:14 +0000 (15:37 +0200)
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: 18ec54fdd6d1 ("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>
arch/x86/entry/entry_64.S

index 57a0d96d6beba5991b9d99b28ce67ab601dc16f9..b043c754d978fdaca6763e515244e6267cb8c1ca 100644 (file)
@@ -549,7 +549,7 @@ ENTRY(interrupt_entry)
        UNWIND_HINT_FUNC
 
        movq    (%rdi), %rdi
-       jmpq    2f
+       jmp     2f
 1:
        FENCE_SWAPGS_KERNEL_ENTRY
 2: