summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/signal32.c
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2008-08-17 14:49:25 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 15:18:41 (GMT)
commit5d9a76cd0ed367d01b0b237253adb7607e86a277 (patch)
tree1c239a7cc3044a6ddc077148e97c1182aa8eb065 /arch/mips/kernel/signal32.c
parentb922df7383749a1c0b7ea64c50fa839263d3816b (diff)
downloadlinux-5d9a76cd0ed367d01b0b237253adb7607e86a277.tar.xz
MIPS: Use compat_sys_ptrace
This replaces mips's sys_ptrace32 with a compat_arch_ptrace and enables the new generic definition of compat_sys_ptrace instead. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/signal32.c')
-rw-r--r--arch/mips/kernel/signal32.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 572c610..652709b 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -482,6 +482,18 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
return err;
}
+int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
+{
+ memset(to, 0, sizeof *to);
+
+ if (copy_from_user(to, from, 3*sizeof(int)) ||
+ copy_from_user(to->_sifields._pad,
+ from->_sifields._pad, SI_PAD_SIZE32))
+ return -EFAULT;
+
+ return 0;
+}
+
asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
{
struct sigframe32 __user *frame;