From: Rob Gardner <rob.gardner@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sparc64: fix FP corruption in user copy functions
Date: Wed, 23 Dec 2015 17:31:01 +0000 [thread overview]
Message-ID: <567ADA55.9070904@oracle.com> (raw)
In-Reply-To: <1450851889-8950-1-git-send-email-rob.gardner@oracle.com>
On 12/23/2015 09:21 AM, David Miller wrote:
> From: Rob Gardner <rob.gardner@oracle.com>
> Date: Tue, 22 Dec 2015 23:24:49 -0700
>
>> Short story: Exception handlers used by some copy_to_user() and
>> copy_from_user() functions do not diligently clean up floating point
>> register usage, and this can result in a user process seeing invalid
>> values in floating point registers. This sometimes makes the process
>> fail.
> Can you show me a specific example where the FPU register contents
> actually matter?
>
> When we are copying to or from userspace, we are in a most of the time
> system call, and for that specific case all FPU registers are volatile
> across the system call.
>
> I guess it might matter for the perf stack backtrace stuff.
>
It does matter for the perf stack backtrace case. Running "perf record
-g ..." can cause random processes to experience FP register corruption.
Most of the time this is not noticed, but once in a while it can cause a
process to get incorrect results or corrupted data.
This bug seriously affects system stability when using perf, and was
discovered while studying the plethora of perf problems.
Rob
next prev parent reply other threads:[~2015-12-23 17:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 6:24 [PATCH] sparc64: fix FP corruption in user copy functions Rob Gardner
2015-12-23 16:21 ` David Miller
2015-12-23 17:31 ` Rob Gardner [this message]
2015-12-23 20:02 ` David Miller
2015-12-24 16:43 ` David Miller
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=567ADA55.9070904@oracle.com \
--to=rob.gardner@oracle.com \
--cc=sparclinux@vger.kernel.org \
/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.