From: Borislav Petkov <bp@alien8.de>
To: Ser Olmy <ser.olmy@protonmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
x86-ml <x86@kernel.org>
Subject: Re: [x86] Kernel v5.14 series panic on Celeron Mendocino CPU
Date: Wed, 6 Oct 2021 15:34:51 +0200 [thread overview]
Message-ID: <YV2l+1oIGd2p/Gt5@zn.tnic> (raw)
In-Reply-To: <YqPgABmVMzvEllmeYzm8tkSaqtC-Q8nzeNjgNBXVPnQtPCHAeFg7IdwpzBECDcFGjrCBkFVegcYvqh_KoGnyOsbK4oC91VHw5G-qUlwlCvM=@protonmail.com>
On Wed, Oct 06, 2021 at 12:42:47AM +0000, Ser Olmy wrote:
> Sure:
Thx.
> [ 21.670972] fpu->state.fxsave.mxcsr: 0xb7be13b4, mxcsr_feature_mask: 0xffbf
> [ 21.754383] WARNING: CPU: 0 PID: 1 at arch/x86/kernel/fpu/signal.c:384 __fpu_restore_sig+0x51f/0x540
As tglx expected.
I guess this fixes your issue (replace with previous diff pls):
---
diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
index 445c57c9c539..684be34d4609 100644
--- a/arch/x86/kernel/fpu/signal.c
+++ b/arch/x86/kernel/fpu/signal.c
@@ -379,9 +379,8 @@ static int __fpu_restore_sig(void __user *buf, void __user *buf_fx,
sizeof(fpu->state.fxsave)))
return -EFAULT;
- /* Reject invalid MXCSR values. */
- if (fpu->state.fxsave.mxcsr & ~mxcsr_feature_mask)
- return -EINVAL;
+ /* Mask out reserved MXCSR bits. */
+ fpu->state.fxsave.mxcsr &= mxcsr_feature_mask;
/* Enforce XFEATURE_MASK_FPSSE when XSAVE is enabled */
if (use_xsave())
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-10-06 13:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 17:47 [x86] Kernel v5.14 series panic on Celeron Mendocino CPU Ser Olmy
2021-10-04 17:59 ` Borislav Petkov
2021-10-04 18:17 ` Ser Olmy
2021-10-05 10:05 ` Borislav Petkov
2021-10-06 0:42 ` Ser Olmy
2021-10-06 13:34 ` Borislav Petkov [this message]
2021-10-06 14:22 ` Ser Olmy
2021-10-06 17:38 ` [tip: x86/urgent] x86/fpu: Restore the masking out of reserved MXCSR bits tip-bot2 for Borislav Petkov
2021-10-07 23:40 ` Thomas Gleixner
2021-10-08 9:58 ` tip-bot2 for Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YV2l+1oIGd2p/Gt5@zn.tnic \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ser.olmy@protonmail.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox