diff options
Diffstat (limited to 'arch/powerpc/kernel')
| -rw-r--r-- | arch/powerpc/kernel/ppc32.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/ptrace32.c | 27 |
2 files changed, 0 insertions, 29 deletions
diff --git a/arch/powerpc/kernel/ppc32.h b/arch/powerpc/kernel/ppc32.h index fda05e2211d6..90e562771791 100644 --- a/arch/powerpc/kernel/ppc32.h +++ b/arch/powerpc/kernel/ppc32.h | |||
| @@ -135,6 +135,4 @@ struct ucontext32 { | |||
| 135 | struct mcontext32 uc_mcontext; | 135 | struct mcontext32 uc_mcontext; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | extern int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s); | ||
| 139 | |||
| 140 | #endif /* _PPC64_PPC32_H */ | 138 | #endif /* _PPC64_PPC32_H */ |
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 9d30e10970ac..4c1de6af4c09 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
| @@ -29,15 +29,12 @@ | |||
| 29 | #include <linux/security.h> | 29 | #include <linux/security.h> |
| 30 | #include <linux/signal.h> | 30 | #include <linux/signal.h> |
| 31 | #include <linux/compat.h> | 31 | #include <linux/compat.h> |
| 32 | #include <linux/elf.h> | ||
| 33 | 32 | ||
| 34 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
| 35 | #include <asm/page.h> | 34 | #include <asm/page.h> |
| 36 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
| 37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
| 38 | 37 | ||
| 39 | #include "ppc32.h" | ||
| 40 | |||
| 41 | /* | 38 | /* |
| 42 | * does not yet catch signals sent when the child dies. | 39 | * does not yet catch signals sent when the child dies. |
| 43 | * in exit.c or in signal.c. | 40 | * in exit.c or in signal.c. |
| @@ -67,27 +64,6 @@ static long compat_ptrace_old(struct task_struct *child, long request, | |||
| 67 | return -EPERM; | 64 | return -EPERM; |
| 68 | } | 65 | } |
| 69 | 66 | ||
| 70 | static int compat_ptrace_getsiginfo(struct task_struct *child, compat_siginfo_t __user *data) | ||
| 71 | { | ||
| 72 | siginfo_t lastinfo; | ||
| 73 | int error = -ESRCH; | ||
| 74 | |||
| 75 | read_lock(&tasklist_lock); | ||
| 76 | if (likely(child->sighand != NULL)) { | ||
| 77 | error = -EINVAL; | ||
| 78 | spin_lock_irq(&child->sighand->siglock); | ||
| 79 | if (likely(child->last_siginfo != NULL)) { | ||
| 80 | lastinfo = *child->last_siginfo; | ||
| 81 | error = 0; | ||
| 82 | } | ||
| 83 | spin_unlock_irq(&child->sighand->siglock); | ||
| 84 | } | ||
| 85 | read_unlock(&tasklist_lock); | ||
| 86 | if (!error) | ||
| 87 | return copy_siginfo_to_user32(data, &lastinfo); | ||
| 88 | return error; | ||
| 89 | } | ||
| 90 | |||
| 91 | long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | 67 | long compat_arch_ptrace(struct task_struct *child, compat_long_t request, |
| 92 | compat_ulong_t caddr, compat_ulong_t cdata) | 68 | compat_ulong_t caddr, compat_ulong_t cdata) |
| 93 | { | 69 | { |
| @@ -306,9 +282,6 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
| 306 | 0, PT_REGS_COUNT * sizeof(compat_long_t), | 282 | 0, PT_REGS_COUNT * sizeof(compat_long_t), |
| 307 | compat_ptr(data)); | 283 | compat_ptr(data)); |
| 308 | 284 | ||
| 309 | case PTRACE_GETSIGINFO: | ||
| 310 | return compat_ptrace_getsiginfo(child, compat_ptr(data)); | ||
| 311 | |||
| 312 | case PTRACE_GETFPREGS: | 285 | case PTRACE_GETFPREGS: |
| 313 | case PTRACE_SETFPREGS: | 286 | case PTRACE_SETFPREGS: |
| 314 | case PTRACE_GETVRREGS: | 287 | case PTRACE_GETVRREGS: |
