Re: [PATCH] x86/fpu: always restore_xinit_state() when !use_eager_cpu()

From: Oleg Nesterov
Date: Mon Apr 27 2015 - 11:01:38 EST


On 04/27, Dave Hansen wrote:
>
> On 04/26/2015 03:04 PM, Bobby Powers wrote:
>
> > The functional change was that flush_thread after f893959b only calls
> > restore_init_xstate when both !use_eager_fpu and !used_math are true.
> > drop_init_fpu (now fpu_reset_state) calls restore_init_xstate()
> > regardless of whether current used_math().
>
> This is really interesting. We were seeing some issues where the xstate
> was not getting cleared across an exec, which seemed silly, but we just
> assumed it was something that had always been there.

This is because I am stupid.

Without this Bobby's fix flush_thread() simply does nothing if a user-space
task execs (if eagerfpu).

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/