All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] MIPS: Fix FPU preemption issues
@ 2016-02-01 13:50 ` James Hogan
  0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2016-02-01 13:50 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, Paul Burton, James Hogan

These patches aim to prevent the FPU being left enabled across a task
context switch due to full kernel preemption. This could result in
returning to a KVM guest with FPU enabled.

Patch 1 fixes a more theoretical case that I spotted where TIF_USEDFPU
is cleared without disabling the FPU in the execve path.

Patch 2 fixes a much easier to hit case (multiple WARNs before reaching
login prompt if only the WARN part of patch is applied) due to saved
Status in interrupt context not being updated when FPU is disabled. In
doing so it also allows an orphaned enabled FPU to remain enabled
through to user mode, hence the new WARN on context switch to catch
future cases of it.

James Hogan (2):
  MIPS: Properly disable FPU in start_thread()
  MIPS: Fix FPU disable with preemption

 arch/mips/include/asm/fpu.h        | 4 ++++
 arch/mips/include/asm/stackframe.h | 4 ++--
 arch/mips/kernel/process.c         | 6 ++----
 3 files changed, 8 insertions(+), 6 deletions(-)

-- 
2.4.10

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-01 22:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 13:50 [PATCH 0/2] MIPS: Fix FPU preemption issues James Hogan
2016-02-01 13:50 ` James Hogan
2016-02-01 13:50 ` [PATCH 1/2] MIPS: Properly disable FPU in start_thread() James Hogan
2016-02-01 13:50   ` James Hogan
2016-02-01 13:50 ` [PATCH 2/2] MIPS: Fix FPU disable with preemption James Hogan
2016-02-01 13:50   ` James Hogan
2016-02-01 22:54 ` [PATCH 0/2] MIPS: Fix FPU preemption issues Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.