https://github.com/torvalds/linux
Revision bdec97a855ef1e239f130f7a11584721c9a1bf04 authored by Will Deacon on 15 September 2015, 11:07:06 UTC, committed by Will Deacon on 17 September 2015, 10:57:03 UTC
When saving/restoring the VFP registers from a compat (AArch32) signal frame, we rely on the compat registers forming a prefix of the native register file and therefore make use of copy_{to,from}_user to transfer between the native fpsimd_state and the compat_vfp_sigframe. Unfortunately, this doesn't work so well in a big-endian environment. Our fpsimd save/restore code operates directly on 128-bit quantities (Q registers) whereas the compat_vfp_sigframe represents the registers as an array of 64-bit (D) registers. The architecture packs the compat D registers into the Q registers, with the least significant bytes holding the lower register. Consequently, we need to swap the 64-bit halves when converting between these two representations on a big-endian machine. This patch replaces the __copy_{to,from}_user invocations in our compat VFP signal handling code with explicit __put_user loops that operate on 64-bit values and swap them accordingly. Cc: <stable@vger.kernel.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent e56d82a
Tip revision: bdec97a855ef1e239f130f7a11584721c9a1bf04 authored by Will Deacon on 15 September 2015, 11:07:06 UTC
arm64: compat: fix vfp save/restore across signal handlers in big-endian
arm64: compat: fix vfp save/restore across signal handlers in big-endian
Tip revision: bdec97a
File | Mode | Size |
---|---|---|
Documentation | ||
arch | ||
block | ||
certs | ||
crypto | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.get_maintainer.ignore | -rw-r--r-- | 31 bytes |
.gitignore | -rw-r--r-- | 1.2 KB |
.mailmap | -rw-r--r-- | 5.3 KB |
COPYING | -rw-r--r-- | 18.3 KB |
CREDITS | -rw-r--r-- | 94.9 KB |
Kbuild | -rw-r--r-- | 2.6 KB |
Kconfig | -rw-r--r-- | 252 bytes |
MAINTAINERS | -rw-r--r-- | 319.8 KB |
Makefile | -rw-r--r-- | 53.2 KB |
README | -rw-r--r-- | 18.2 KB |
REPORTING-BUGS | -rw-r--r-- | 7.3 KB |
Computing file changes ...