lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 27 Feb 2016 13:02:11 +0100
From:	Ingo Molnar <>
To:	Borislav Petkov <>
Cc:	kernel test robot <>,
	Andy Lutomirski <>,,
	LKML <>,
	yu-cheng yu <>,
	Thomas Gleixner <>,
	Sai Praneeth Prakhya <>,
	Rik van Riel <>,
	Quentin Casasnovas <>,
	Peter Zijlstra <>,
	Oleg Nesterov <>,
	Linus Torvalds <>,
	"H. Peter Anvin" <>,
	Fenghua Yu <>,
	Dave Hansen <>,
	Andy Lutomirski <>
Subject: Re: [lkp] [x86/fpu] 58122bf1d8: WARNING: CPU: 0 PID: 1 at
 arch/x86/include/asm/fpu/internal.h:529 fpu__restore+0x28f/0x9ab()

* Borislav Petkov <> wrote:

> From: Borislav Petkov <>
> Date: Mon, 15 Feb 2016 19:50:33 +0100
> Subject: [PATCH] x86/FPU: Fix double FPU regs activation
> sys_sigreturn() calls fpu__restore_sig() with interrupts enabled. When
> restoring a 32-bit signal frame. And it can happen that we get preempted
> right after setting ->fpstate_active in a task's FPU.
> After we get preempted, we switch between tasks merrily and eventually
> are about to switch to that task above whose ->fpstate_active we
> set. We enter __switch_to() and do switch_fpu_prepare(). Our task gets
> ->fpregs_active set, we find ourselves back on the call stack below and
> especially in __fpu__restore_sig() which sets ->fpregs_active again.
> Leading to that whoops below.
> So let's enlarge the preemption-off region so that we set
> ->fpstate_active with preemption disabled and thus not trigger
> fpu.preload:
>   switch_fpu_prepare
>   ...
>         fpu.preload = static_cpu_has(X86_FEATURE_FPU) &&
>                       new_fpu->fpstate_active &&
> 		      ^^^^^^^^^^^^^^^^^^^^^^
> prematurely.

So I'm wondering, why did this commit:

  58122bf1d856 x86/fpu: Default eagerfpu=on on all CPUs

trigger the warning, while it never triggered on CPUs that were already 
eagerfpu=on for years?

There must be something we are still missing I think.



Powered by blists - more mailing lists