Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84003
b: refs/heads/master
c: 81e695c
h: refs/heads/master
i:
  84001: 2f42b29
  83999: 77b25fa
v: v3
  • Loading branch information
Roland McGrath authored and Paul Mackerras committed Feb 7, 2008
1 parent 84a2121 commit b1c3459
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d48d71c06172c0853e04c334456e64cc006e208
refs/heads/master: 81e695c026eeda9a97e412fa4f458e5cab2f6c85
33 changes: 5 additions & 28 deletions trunk/arch/powerpc/kernel/ptrace32.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,33 +85,13 @@ static long compat_ptrace_old(struct task_struct *child, long request,
return ret;
}

long compat_sys_ptrace(int request, int pid, unsigned long addr,
unsigned long data)
long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
compat_ulong_t caddr, compat_ulong_t cdata)
{
struct task_struct *child;
unsigned long addr = caddr;
unsigned long data = cdata;
int ret;

lock_kernel();
if (request == PTRACE_TRACEME) {
ret = ptrace_traceme();
goto out;
}

child = ptrace_get_task_struct(pid);
if (IS_ERR(child)) {
ret = PTR_ERR(child);
goto out;
}

if (request == PTRACE_ATTACH) {
ret = ptrace_attach(child);
goto out_tsk;
}

ret = ptrace_check_attach(child, request == PTRACE_KILL);
if (ret < 0)
goto out_tsk;

switch (request) {
/*
* Read 4 bytes of the other process' storage
Expand Down Expand Up @@ -375,9 +355,6 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
ret = compat_ptrace_request(child, request, addr, data);
break;
}
out_tsk:
put_task_struct(child);
out:
unlock_kernel();

return ret;
}
2 changes: 2 additions & 0 deletions trunk/include/asm-powerpc/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ struct pt_regs {

#ifdef __powerpc64__

#define __ARCH_WANT_COMPAT_SYS_PTRACE

#define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */

/* Size of dummy stack frame allocated when calling signal handler. */
Expand Down

0 comments on commit b1c3459

Please sign in to comment.