summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2019-07-15 11:51:39 -0500
committerBen Hutchings <ben@decadent.org.uk>2019-08-13 12:39:22 +0100
commite191f5119eba311b3585492174825db763eeb3b9 (patch)
tree97b609ba0a4b57e35568a83315bc46a38053ae2f
parentbba3308d5fe2c8c4605db3ea868ba57ad990d27d (diff)
downloadlinux-stable-e191f5119eba311b3585492174825db763eeb3b9.tar.gz
linux-stable-e191f5119eba311b3585492174825db763eeb3b9.tar.bz2
linux-stable-e191f5119eba311b3585492174825db763eeb3b9.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> [bwh: Backported to 3.16: adjust filename, context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--arch/x86/kernel/entry_64.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index b4274d9a4e2e..467069f38f21 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -267,7 +267,7 @@ ENDPROC(native_usergs_sysret64)
SWAPGS
FENCE_SWAPGS_USER_ENTRY
SWITCH_KERNEL_CR3
- jmpq 2f
+ jmp 2f
1:
FENCE_SWAPGS_KERNEL_ENTRY
2: