x86/entry/64: Use JMP instead of JMPQ
authorJosh Poimboeuf <jpoimboe@redhat.com>
Mon, 15 Jul 2019 16:51:39 +0000 (11:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Aug 2019 17:06:58 +0000 (19:06 +0200)
commit931b6bfe8af1069fd1a494ef6ab14509ffeacdc3
tree63c696c6858015be1a7d3d103a3709d50be9bf1d
parent23e7a7b3a75f6dd24c161bf7d1399f251bf5c109
x86/entry/64: Use JMP instead of JMPQ

commit 64dbc122b20f75183d8822618c24f85144a5a94d 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/entry_64.S