diff options
author | Paul Mackerras <paulus@samba.org> | 2013-10-23 08:40:02 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-10 22:34:18 (GMT) |
commit | 2121b416ccd09d83ce7c79aa67afb4fc8ba73694 (patch) | |
tree | 193c4da56da27809080480c502e9785ddbc5d460 /drivers/tty/ipwireless/network.c | |
parent | 2bee384ff3c019bebe1f1dd8ceb92fa8cc791e96 (diff) | |
download | linux-fsl-qoriq-2121b416ccd09d83ce7c79aa67afb4fc8ba73694.tar.xz |
powerpc: Don't corrupt user registers on 32-bit
Commit de79f7b9f6 ("powerpc: Put FP/VSX and VR state into structures")
modified load_up_fpu() and load_up_altivec() in such a way that they
now use r7 and r8. Unfortunately, the callers of these functions on
32-bit machines then return to userspace via fast_exception_return,
which doesn't restore all of the volatile GPRs, but only r1, r3 -- r6
and r9 -- r12. This was causing userspace segfaults and other
userspace misbehaviour on 32-bit machines.
This fixes the problem by changing the register usage of load_up_fpu()
and load_up_altivec() to avoid using r7 and r8 and instead use r6 and
r10. This also adds comments to those functions saying which registers
may be used.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Tested-by: Scott Wood <scottwood@freescale.com> (on e500mc, so no altivec)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
(cherry picked from commit 955c1cab809edfb5429603c68493363074ac20cf)
Diffstat (limited to 'drivers/tty/ipwireless/network.c')
0 files changed, 0 insertions, 0 deletions