All of lore.kernel.org
 help / color / mirror / Atom feed
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: Tue, 5 Oct 2021 12:05:23 +0200	[thread overview]
Message-ID: <YVwjY9TX6XMxkM2f@zn.tnic> (raw)
In-Reply-To: <lxqAtqDf_kLUxIlvmYPvuKB36LOK-z_cVbS9OOl0MbjZKZEaCaEFmHCbSy5sWBer6f9V_WAPLxUuSNrDBvyzEeQOJXepkVUztPXAOhPZniQ=@protonmail.com>

On Mon, Oct 04, 2021 at 06:17:42PM +0000, Ser Olmy wrote:
> On Monday, October 4th, 2021 at 7:59 PM, Borislav Petkov <bp@alien8.de> wrote:
> >
> > I'm assuming your CPU cannot do 64-bit mode?
> 
> Correct, it's an old Socket 370 Celeron

Ok, thanks for the info.

On your next reply, can you please hit the "reply-to-all" button so that
I can get your reply and not have to go fish it out of the lkml flood? I
would've easily missed it if tglx didn't point me to it.

In any case, your CPU is too old for me to even find such a box and your
.config boots fine in qemu so I guess we'll have to debug it.

Can you apply the diff below on your 5.14.9 kernel, boot with it and
send full dmesg again?

Thx.

---
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
index 64e29927cc32..5c6c11f831ed 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
@@ -112,7 +112,11 @@ static void __init fpu__init_system_mxcsr(void)
 		if (mask == 0)
 			mask = 0x0000ffbf;
 	}
+
 	mxcsr_feature_mask &= mask;
+
+	pr_info("%s: mxcsr_feature_mask: 0x%x, mask: 0x%x\n",
+		__func__, mxcsr_feature_mask, mask);
 }
 
 /*
diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
index 445c57c9c539..808a0ff85141 100644
--- a/arch/x86/kernel/fpu/signal.c
+++ b/arch/x86/kernel/fpu/signal.c
@@ -380,8 +380,11 @@ static int __fpu_restore_sig(void __user *buf, void __user *buf_fx,
 			return -EFAULT;
 
 		/* Reject invalid MXCSR values. */
-		if (fpu->state.fxsave.mxcsr & ~mxcsr_feature_mask)
+		if (fpu->state.fxsave.mxcsr & ~mxcsr_feature_mask) {
+			WARN_ONCE(1, "fpu->state.fxsave.mxcsr: 0x%x, mxcsr_feature_mask: 0x%x\n",
+				  fpu->state.fxsave.mxcsr, mxcsr_feature_mask);
 			return -EINVAL;
+		}
 
 		/* Enforce XFEATURE_MASK_FPSSE when XSAVE is enabled */
 		if (use_xsave())


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2021-10-05 10:05 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 [this message]
2021-10-06  0:42       ` Ser Olmy
2021-10-06 13:34         ` Borislav Petkov
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=YVwjY9TX6XMxkM2f@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.