aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2019-07-15 11:51:39 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-21 11:21:52 -0400
commit80d91a69b81dfd28c26cb68060fb18788ffebad7 (patch)
tree569d1337f80d3734c77820159983aff1a2781fba
parenteeec71987766b96c558ded84ee60a6b1ebb5cfb0 (diff)
downloadlinux-yocto-80d91a69b81dfd28c26cb68060fb18788ffebad7.tar.gz
linux-yocto-80d91a69b81dfd28c26cb68060fb18788ffebad7.tar.bz2
linux-yocto-80d91a69b81dfd28c26cb68060fb18788ffebad7.zip
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: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--arch/x86/entry/entry_64.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index d584bdaf1eaa..d7753fb25bc6 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -599,7 +599,7 @@ ENTRY(interrupt_entry)
UNWIND_HINT_FUNC
movq (%rdi), %rdi
- jmpq 2f
+ jmp 2f
1:
FENCE_SWAPGS_KERNEL_ENTRY
2: