projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consolidate PTRACE_DETACH
[cascardo/linux.git]
/
arch
/
sh64
/
kernel
/
ptrace.c
diff --git
a/arch/sh64/kernel/ptrace.c
b/arch/sh64/kernel/ptrace.c
index
cd22e94
..
8a2d339
100644
(file)
--- a/
arch/sh64/kernel/ptrace.c
+++ b/
arch/sh64/kernel/ptrace.c
@@
-17,7
+17,6
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/rwsem.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/rwsem.h>
#include <linux/sched.h>
@@
-130,17
+129,9
@@
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
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 long tmp;
- int copied;
-
- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
- ret = -EIO;
- if (copied != sizeof(tmp))
- break;
- ret = put_user(tmp,(unsigned long *) data);
+ case PTRACE_PEEKDATA:
+ ret = generic_ptrace_peekdata(child, addr, data);
break;
break;
- }
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
@@
-167,10
+158,7
@@
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
/* when I and D space are separate, this will have to be fixed. */
case PTRACE_POKETEXT: /* write the word at location addr. */
case PTRACE_POKEDATA:
/* when I and D space are separate, this will have to be fixed. */
case PTRACE_POKETEXT: /* write the word at location addr. */
case PTRACE_POKEDATA:
- ret = 0;
- if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
- break;
- ret = -EIO;
+ ret = generic_ptrace_pokedata(child, addr, data);
break;
case PTRACE_POKEUSR:
break;
case PTRACE_POKEUSR:
@@
-256,10
+244,6
@@
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
break;
}
break;
}
- case PTRACE_DETACH: /* detach a process that was attached. */
- ret = ptrace_detach(child, data);
- break;
-
default:
ret = ptrace_request(child, request, addr, data);
break;
default:
ret = ptrace_request(child, request, addr, data);
break;