Re: [patch] x64, fpu: fix possible FPU leakage in error conditions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Suresh Siddha
Date: Thursday, July 24, 2008 - 11:50 am

On Thu, Jul 24, 2008 at 11:31:42AM -0700, Linus Torvalds wrote:

init_fpu() will set it to sane init state, from where we can restore.


Yes, this was what I had in mind earlier and should be ok for signal handling
case. But as you also noted below:


We are doing init_fpu(), which should make the data sane again.

This is a paranoid case, just to make sure that the next
math_state_restore()  doesn't cause #GP, after someone sets illegal values
through ptrace() or 32bit signal handling (which modifies fpu state in thread
struct). I say paranoid, because we already do the necessary checks
in the corresponding locations like ptrace/32-bit signal handling.

If we don't do init_fpu() + restore from the sane init state, process has
to be killed, in the paranoid failing scenario of math_state_restore()

thanks,
suresh
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch] x64, fpu: fix possible FPU leakage in error co ..., Suresh Siddha, (Thu Jul 24, 11:50 am)