Commit ac26d1f7 authored by Jann Horn's avatar Jann Horn Committed by Borislav Petkov

x86/fpu: Use the correct exception table macro in the XSTATE_OP wrapper


  75045f77 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups")

incorrectly replaced the fixup entry for XSTATE_OP with a user-#PF-only
fixup. XRSTOR can also raise #GP if the xstate content is invalid,
and _ASM_EXTABLE_UA doesn't expect that. Change this fixup back to
_ASM_EXTABLE so that #GP gets fixed up.

Fixes: 75045f77 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups")
Reported-by: default avatarSebastian Andrzej Siewior <>
Signed-off-by: Jann Horn's avatarJann Horn <>
Signed-off-by: default avatarBorislav Petkov <>
Acked-by: default avatarSebastian Andrzej Siewior <>
Tested-by: default avatarSebastian Andrzej Siewior <>
Cc: "H. Peter Anvin" <>
Cc: "Naveen N. Rao" <>
Cc: Andy Lutomirski <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: x86-ml <>
parent 68239654
......@@ -226,7 +226,7 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
"3: movl $-2,%[err]\n\t" \
"jmp 2b\n\t" \
".popsection\n\t" \
_ASM_EXTABLE_UA(1b, 3b) \
_ASM_EXTABLE(1b, 3b) \
: [err] "=r" (err) \
: "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \
: "memory")
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