]> err.no Git - linux-2.6/commitdiff
x86_64 ia32 ptrace: use compat_ptrace_request for siginfo
authorRoland McGrath <roland@redhat.com>
Tue, 22 Apr 2008 19:20:20 +0000 (12:20 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Apr 2008 15:35:47 +0000 (17:35 +0200)
This removes the special-case handling for PTRACE_GETSIGINFO
and PTRACE_SETSIGINFO from x86_64's sys32_ptrace.  The generic
compat_ptrace_request code handles these.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ptrace.c

index 559c1b027417f66823d8f214b45c61f31bbb77f1..870dc1023d2daeffdede2123c534af6a63825e97 100644 (file)
@@ -1207,32 +1207,6 @@ static int genregs32_set(struct task_struct *target,
        return ret;
 }
 
-static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data)
-{
-       siginfo_t __user *si = compat_alloc_user_space(sizeof(siginfo_t));
-       compat_siginfo_t __user *si32 = compat_ptr(data);
-       siginfo_t ssi;
-       int ret;
-
-       if (request == PTRACE_SETSIGINFO) {
-               memset(&ssi, 0, sizeof(siginfo_t));
-               ret = copy_siginfo_from_user32(&ssi, si32);
-               if (ret)
-                       return ret;
-               if (copy_to_user(si, &ssi, sizeof(siginfo_t)))
-                       return -EFAULT;
-       }
-       ret = sys_ptrace(request, pid, addr, (unsigned long)si);
-       if (ret)
-               return ret;
-       if (request == PTRACE_GETSIGINFO) {
-               if (copy_from_user(&ssi, si, sizeof(siginfo_t)))
-                       return -EFAULT;
-               ret = copy_siginfo_to_user32(si32, &ssi);
-       }
-       return ret;
-}
-
 asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
 {
        struct task_struct *child;
@@ -1280,11 +1254,9 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
        case PTRACE_SETFPXREGS:
        case PTRACE_GETFPXREGS:
        case PTRACE_GETEVENTMSG:
-               break;
-
        case PTRACE_SETSIGINFO:
        case PTRACE_GETSIGINFO:
-               return ptrace32_siginfo(request, pid, addr, data);
+               break;
        }
 
        child = ptrace_get_task_struct(pid);