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

From: Borislav Petkov
Date: Mon May 04 2015 - 04:11:43 EST


On Mon, Apr 27, 2015 at 08:10:41AM -0700, Bobby Powers wrote:
> v2: switch used_math() -> tsk_used_math(tsk) to consistently use the
> grabbed tsk instead of current, like in the rest of flush_thread().
>
> Oleg's commit f893959b ("x86/fpu: Don't abuse drop_init_fpu() in
> flush_thread()") removed drop_init_fpu() usage from flush_thread.
> This seems to break things for me - the Go 1.4 test suite fails all
> over the place with floating point comparision errors (offending
> commit found through bisection).
>
> 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() - apply the same logic here.
>
> Fixes: f893959b ("x86/fpu: Don't abuse drop_init_fpu() in flush_thread()")
> Signed-off-by: Bobby Powers <bobbypowers@xxxxxxxxx>
> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
> Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: Pekka Riikonen <priikone@xxxxxx>
> Cc: Quentin Casasnovas <quentin.casasnovas@xxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxx>
> Cc: Suresh Siddha <sbsiddha@xxxxxxxxx>
> ---
> arch/x86/kernel/process.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)

Applied, thanks.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
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/