Skip to content

Commit 5b9f0c4

Browse files
jgross1suryasaimadhu
authored andcommitted
x86/entry: Fix entry_INT80_compat for Xen PV guests
Commit c89191c ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS") missed one use case of SWAPGS in entry_INT80_compat(). Removing of the SWAPGS macro led to asm just using "swapgs", as it is accepting instructions in capital letters, too. This in turn leads to splats in Xen PV guests like: [ 36.145223] general protection fault, maybe for address 0x2d: 0000 [Rust-for-Linux#1] PREEMPT SMP NOPTI [ 36.145794] CPU: 2 PID: 1847 Comm: ld-linux.so.2 Not tainted 5.19.1-1-default Rust-for-Linux#1 \ openSUSE Tumbleweed f3b44bfb672cdb9f235aff53b57724eba8b9411b [ 36.146608] Hardware name: HP ProLiant ML350p Gen8, BIOS P72 11/14/2013 [ 36.148126] RIP: e030:entry_INT80_compat+0x3/0xa3 Fix that by open coding this single instance of the SWAPGS macro. Fixes: c89191c ("x86/entry: Convert SWAPGS to swapgs and remove the definition of SWAPGS") Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Jan Beulich <[email protected]> Cc: <[email protected]> # 5.19 Link: https://lore.kernel.org/r/[email protected]
1 parent 72cbc8f commit 5b9f0c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/entry/entry_64_compat.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ SYM_CODE_START(entry_INT80_compat)
311311
* Interrupts are off on entry.
312312
*/
313313
ASM_CLAC /* Do this early to minimize exposure */
314-
SWAPGS
314+
ALTERNATIVE "swapgs", "", X86_FEATURE_XENPV
315315

316316
/*
317317
* User tracing code (ptrace or signal handlers) might assume that

0 commit comments

Comments
 (0)