diff options
author | Paul Mackerras <paulus@samba.org> | 2006-06-09 13:02:59 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-09 13:02:59 +1000 |
commit | 7c85d1f9d358b24c5b05c3a2783a78423775a080 (patch) | |
tree | 71f92966cba279120cb81965cb3a5294295413ba /arch/powerpc/kernel/signal_64.c | |
parent | 1def630a6a49dda5bc89dfbd86656293640456f0 (diff) | |
download | linux-7c85d1f9d358b24c5b05c3a2783a78423775a080.tar.gz linux-7c85d1f9d358b24c5b05c3a2783a78423775a080.tar.bz2 linux-7c85d1f9d358b24c5b05c3a2783a78423775a080.zip |
powerpc: Fix machine check problem on 32-bit kernels
This fixes a bug found by Dave Jones that means that it is possible
for userspace to provoke a machine check on 32-bit kernels. This
also fixes a couple of other places where I found similar problems
by inspection.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/signal_64.c')
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 27f65b95184d..c2db642f4cdd 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c @@ -182,6 +182,8 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, err |= __get_user(msr, &sc->gp_regs[PT_MSR]); if (err) return err; + if (v_regs && !access_ok(VERIFY_READ, v_regs, 34 * sizeof(vector128))) + return -EFAULT; /* Copy 33 vec registers (vr0..31 and vscr) from the stack */ if (v_regs != 0 && (msr & MSR_VEC) != 0) err |= __copy_from_user(current->thread.vr, v_regs, |