From: Oleg Nesterov <oleg@redhat.com>
To: Sohil Mehta <sohil.mehta@intel.com>
Cc: "Lai, Yi" <yi1.lai@linux.intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Borislav Petkov <bp@alien8.de>,
"H . Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Sean Christopherson <seanjc@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Vignesh Balasubramanian <vigbalas@amd.com>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
"Chang S . Bae" <chang.seok.bae@intel.com>,
Brian Gerst <brgerst@gmail.com>,
Eric Biggers <ebiggers@google.com>, Kees Cook <kees@kernel.org>,
Chao Gao <chao.gao@intel.com>,
Fushuai Wang <wangfushuai@baidu.com>,
linux-kernel@vger.kernel.org, yi1.lai@intel.com
Subject: Re: [PATCH v3 2/2] x86/fpu: Update the debug flow for x86_task_fpu()
Date: Fri, 8 Aug 2025 17:11:32 +0200 [thread overview]
Message-ID: <20250808151131.GD21685@redhat.com> (raw)
In-Reply-To: <e46bab92-ee1f-478f-8076-d46bd3fe9411@intel.com>
On 08/08, Sohil Mehta wrote:
>
> On 8/8/2025 12:49 AM, Oleg Nesterov wrote:
> > On 08/08, Lai, Yi wrote:
> >>
> >> [ 17.474769] WARNING: CPU: 1 PID: 731 at arch/x86/kernel/fpu/core.c:61 x86_task_fpu+0x76/0x90
> >
> > ...
> >
> >> [ 17.481244] xfpregs_get+0x9c/0x1e0
> >
> > ...
> >
> >> [ 17.485304] do_coredump+0x370e/0x5060
> >
>
> The warning here is mostly benign, right?
>
> x86_task_fpu(target) and x86_task_fpu(current) wouldn't match, causing
> sync_fpstate() to return early.
Sorry, I am not sure I understand...
I only meant that the PF_USER_WORKER check in x86_task_fpu() is not
correct right now.
> However, independent of this warning, can xfpregs_get()->sync_fpstate()
> be called in the context of the PF_USER_WORKER thread?
Probably not but I need to recheck.
> Yeah, I am wondering whether treating PF_USER_WORKER threads as
> equivalent to PF_KTHREAD is truly accurate in the FPU.
I think it is more or less equivalent but needs some work. In fact
I was thinking about it a long ago, see
https://lore.kernel.org/all/20240606120038.GB22450@redhat.com/
I'll try to do something next week.
Oleg.
next prev parent reply other threads:[~2025-08-08 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 1:34 [PATCH v3 1/2] x86/fpu: Fix NULL dereference in avx512_status() Sohil Mehta
2025-07-24 1:34 ` [PATCH v3 2/2] x86/fpu: Update the debug flow for x86_task_fpu() Sohil Mehta
2025-08-08 3:26 ` Lai, Yi
2025-08-08 7:49 ` Oleg Nesterov
2025-08-08 13:59 ` Sohil Mehta
2025-08-08 15:11 ` Oleg Nesterov [this message]
2025-08-08 18:52 ` Sohil Mehta
2025-08-12 12:57 ` Oleg Nesterov
2025-08-14 1:00 ` Sohil Mehta
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=20250808151131.GD21685@redhat.com \
--to=oleg@redhat.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=chang.seok.bae@intel.com \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=hpa@zytor.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=sohil.mehta@intel.com \
--cc=tglx@linutronix.de \
--cc=vigbalas@amd.com \
--cc=wangfushuai@baidu.com \
--cc=x86@kernel.org \
--cc=yi1.lai@intel.com \
--cc=yi1.lai@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).