[PATCH 0/2] MIPS: Fix FPU preemption issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux