[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150315200436.GA30079@redhat.com>
Date: Sun, 15 Mar 2015 21:04:36 +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 4/4] x86/fpu: don't abuse drop_init_fpu() in
flush_thread()
On 03/15, Borislav Petkov wrote:
>
> On Sun, Mar 15, 2015 at 07:16:43PM +0100, Oleg Nesterov wrote:
>
> Anyway, we're on the same page and that was a good exercise :-)
Yes, finally ;)
> +/*
> + * In addition to "forgetting" FPU state for @tsk, we restore the
> + * default FPU state in the eager case. Note, this is not needed in the
> + * non-eager case because there we will set CR0.TS and fault and setup
> + * an FPU state lazily.
> + *
> + * We restore the default FPU state in the eager case here as a means of
> + * addressing the failure of restoring the FPU state which @tsk points
> + * to and we still need some state to use so we use the default, clean
> + * one.
> + */
> static inline void drop_init_fpu(struct task_struct *tsk)
> {
> if (!use_eager_fpu())
But please note that it is not only used after the failure.
See handle_signal() and the first drop_init_fpu() in __restore_xstate_sig().
I think its name is confusing a bit...
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