Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84002
b: refs/heads/master
c: 1d48d71
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Paul Mackerras committed Feb 7, 2008
1 parent 2f42b29 commit 84a2121
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 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: c034243504b8396c4293abdc63aa3fc336a7d870
refs/heads/master: 1d48d71c06172c0853e04c334456e64cc006e208
34 changes: 2 additions & 32 deletions trunk/arch/powerpc/kernel/ptrace32.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/user.h>
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/compat.h>

#include <asm/uaccess.h>
#include <asm/page.h>
Expand Down Expand Up @@ -112,20 +113,6 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
goto out_tsk;

switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
case PTRACE_PEEKDATA: {
unsigned int tmp;
int copied;

copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
ret = -EIO;
if (copied != sizeof(tmp))
break;
ret = put_user(tmp, (u32 __user *)data);
break;
}

/*
* Read 4 bytes of the other process' storage
* data is a pointer specifying where the user wants the
Expand Down Expand Up @@ -225,19 +212,6 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
break;
}

/* If I and D space are separate, this will have to be fixed. */
case PTRACE_POKETEXT: /* write the word at location addr. */
case PTRACE_POKEDATA: {
unsigned int tmp;
tmp = data;
ret = 0;
if (access_process_vm(child, addr, &tmp, sizeof(tmp), 1)
== sizeof(tmp))
break;
ret = -EIO;
break;
}

/*
* Write 4 bytes into the other process' storage
* data is the 4 bytes that the user wants written
Expand Down Expand Up @@ -337,10 +311,6 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
break;
}

case PTRACE_GETEVENTMSG:
ret = put_user(child->ptrace_message, (unsigned int __user *) data);
break;

case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
int ui;
if (!access_ok(VERIFY_WRITE, (void __user *)data,
Expand Down Expand Up @@ -402,7 +372,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr,
break;

default:
ret = ptrace_request(child, request, addr, data);
ret = compat_ptrace_request(child, request, addr, data);
break;
}
out_tsk:
Expand Down

0 comments on commit 84a2121

Please sign in to comment.