[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150313143449.GA21603@redhat.com>
Date: Fri, 13 Mar 2015 15:34:49 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Borislav Petkov <bp@...e.de>
Cc: Dave Hansen <dave.hansen@...el.com>,
Ingo Molnar <mingo@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Pekka Riikonen <priikone@....fi>,
Rik van Riel <riel@...hat.com>,
Suresh Siddha <sbsiddha@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
Quentin Casasnovas <quentin.casasnovas@...cle.com>
Subject: Re: [PATCH 1/4] x86/fpu: document user_fpu_begin()
On 03/13, Borislav Petkov wrote:
>
> On Wed, Mar 11, 2015 at 06:34:09PM +0100, Oleg Nesterov wrote:
> > @@ -464,7 +464,9 @@ static inline int restore_xstate_sig(void __user *buf, int ia32_frame)
> > * Need to be preemption-safe.
> > *
> > * NOTE! user_fpu_begin() must be used only immediately before restoring
> > - * it. This function does not do any save/restore on their own.
> > + * it. This function does not do any save/restore on its own. In a lazy
> > + * fpu mode this is just optimization to avoid a dna fault, the task can
> > + * lose FPU right after preempt_enable().
> > */
>
> I cleaned it up a bit more, if you don't mind:
...
> /*
> - * Need to be preemption-safe.
> + * Needs to be preemption-safe.
> *
> * NOTE! user_fpu_begin() must be used only immediately before restoring
> - * it. This function does not do any save/restore on their own.
> + * the save state. It does not do any saving/restoring on its own. In
> + * lazy FPU mode, it is just an optimization to avoid a #NM exception,
> + * the task can lose the FPU right after preempt_enable().
> */
Thank!
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists