[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-ac26d1f74cfc19c8dc9d533b5f20e99dbee3d9bd@git.kernel.org>
Date: Tue, 27 Nov 2018 09:03:56 -0800
From: tip-bot for Jann Horn <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...hat.com,
naveen.n.rao@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
bigeasy@...utronix.de, bp@...e.de, x86@...nel.org, hpa@...or.com,
mingo@...nel.org, luto@...nel.org, jannh@...gle.com
Subject: [tip:x86/urgent] x86/fpu: Use the correct exception table macro in
the XSTATE_OP wrapper
Commit-ID: ac26d1f74cfc19c8dc9d533b5f20e99dbee3d9bd
Gitweb: https://git.kernel.org/tip/ac26d1f74cfc19c8dc9d533b5f20e99dbee3d9bd
Author: Jann Horn <jannh@...gle.com>
AuthorDate: Tue, 27 Nov 2018 14:32:00 +0100
Committer: Borislav Petkov <bp@...e.de>
CommitDate: Tue, 27 Nov 2018 17:55:45 +0100
x86/fpu: Use the correct exception table macro in the XSTATE_OP wrapper
Commit
75045f77f7a7 ("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: 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups")
Reported-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Jann Horn <jannh@...gle.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Tested-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: kernel-hardening@...ts.openwall.com
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20181126165957.xhsyu2dhyy45mrjo@linutronix.de
Link: https://lkml.kernel.org/r/20181127133200.38322-1-jannh@google.com
---
arch/x86/include/asm/fpu/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h
index 5f7290e6e954..69dcdf195b61 100644
--- a/arch/x86/include/asm/fpu/internal.h
+++ b/arch/x86/include/asm/fpu/internal.h
@@ -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")
Powered by blists - more mailing lists