lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 06/39] x86/fpu: Add helper for modifying xstate
Date
On Wed, 2023-02-01 at 12:01 +0100, Borislav Petkov wrote:
> On Thu, Jan 19, 2023 at 01:22:44PM -0800, Rick Edgecombe wrote:
> > +void fpregs_lock_and_load(void)
> > +{
> > + /*
> > + * fpregs_lock() only disables preemption (mostly). So
> > modifying state
> > + * in an interrupt could screw up some in progress fpregs
> > operation,
> > + * but appear to work. Warn about it.
>
> I don't like comments where it sounds like we don't know what we're
> doing. "Appear to work"?

I can change it. This patch started with the observation that modifying
xstate from the kernel had been gotten wrong a couple times in the
past, so that is what this is referencing. Since then, the fancy
automatic solution got boiled down to this helper and a couple
warnings.

\
 
 \ /
  Last update: 2023-03-27 00:06    [W:0.195 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site