Commit db89140f authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Kleber Sacilotto de Souza

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: 18ec54fd ("x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations")
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>

CVE-2019-1125

(backported from commit 64dbc122)
[tyhicks: Adjust context in entry_64.S]
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 66537e88
...@@ -580,7 +580,7 @@ END(irq_entries_start) ...@@ -580,7 +580,7 @@ END(irq_entries_start)
call enter_from_user_mode call enter_from_user_mode
#endif #endif
jmpq 2f jmp 2f
1: 1:
FENCE_SWAPGS_KERNEL_ENTRY FENCE_SWAPGS_KERNEL_ENTRY
2: 2:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment