Messages in this thread | | | Date | Sun, 27 Nov 2011 20:00:58 -0800 | From | Andy Lutomirski <> | Subject | Re: Floating point usage inside kernel |
| |
On 11/25/2011 08:16 AM, Nuno Santos wrote: > Hi Jiri, > > Thanks for your reply. > > The algorithm is a matrix transform computation to make a affine a > geometric transform. > > Basicly it is based on the following functions: > > http://pastebin.com/YHzYuLPU > > Curiously I ran a test before writing this email and guest what.... is > working!! :) > > But now that I have opened this question here I should ask... is it safe?
[...]
> I'm not protecting the call to the function with kernel_fpu_begin and > kernel_fpu_end
It's not safe even if you do protect it with kernel_fpu_begin. On x86-64, a userspace process that mucks with MXCSR can trivially cause you to oops even if you use kernel_fpu_begin. (I'm pretty sure x86-32 has a similar issue, and I imagine that other architectures have related issues.) This might change someday, but there are exactly zero use cases outside staging, so don't hold your breath.
--Andy
| |