On 12/23/2015 09:21 AM, David Miller wrote:
From: Rob Gardner <rob.gardner@xxxxxxxxxx>
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
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html