From: Andy Lutomirski <luto@MIT.EDU>
To: Nuno Santos <nsantos@edigma.com>
Cc: Jiri Slaby <jirislaby@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Floating point usage inside kernel
Date: Sun, 27 Nov 2011 20:00:58 -0800 [thread overview]
Message-ID: <4ED3077A.8060206@mit.edu> (raw)
In-Reply-To: <4ECFBF56.4000002@edigma.com>
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
prev parent reply other threads:[~2011-11-28 4:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <S1754322Ab1KYK6W/20111125105822Z+929@vger.kernel.org>
2011-11-25 11:14 ` Floating point usage inside kernel Nuno Santos
2011-11-25 12:08 ` Jiri Slaby
2011-11-25 16:16 ` Nuno Santos
2011-11-25 17:05 ` Paulo Marques
2011-11-25 17:46 ` Nuno Santos
2011-11-25 18:10 ` Paulo Marques
2011-11-28 10:11 ` Nuno Santos
2011-11-28 12:50 ` Paulo Marques
2011-11-28 4:00 ` Andy Lutomirski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ED3077A.8060206@mit.edu \
--to=luto@mit.edu \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nsantos@edigma.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.