On Tue, Mar 11, 2008 at 10:08:16AM +0100, Ingo Molnar wrote:
init_fpu() is getting called only if !used_math() and in this case, we don't
do any FP operations in init_fpu()
AFAICS, fault handler is doing do_group_exit(SIGKILL); under out-of-memory
conditions while handling page fault.
Just want to make sure that the user doesn't see this signal.
force_sig() with SIGKILL/SIGBUS along with
printk("out of memory! killing process") is fair enough, right?
:) Didn't feel SIGKILL was completely crappy..
Good point. But math_state_restore() should never happen between
the kernel_fpu_begin() and end() sections. Otherwise, it will corrupt the
user's FPU data.
Today, we make sure that we don't get device not available (DNA) exceptions
in kernel_fpu_begin() by explicitly doing clts()
Based on above, do you think this is still needed? Even if it is needed,
the check should be
BUG_ON(!user_mode(regs))
thanks,
suresh
--