x86: ptrace_request peekdata/pokedata
authorRoland McGrath <roland@redhat.com>
Wed, 30 Jan 2008 12:31:47 +0000 (13:31 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:31:47 +0000 (13:31 +0100)
This makes ptrace_request handle {PEEK,POKE}{TEXT,DATA} directly.
Every arch_ptrace that could call generic_ptrace_peekdata already
has a default case calling ptrace_request, so this keeps things
simpler for the arch code.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/ptrace.c

index 973d727f5e846621c43e471d71b08364b9d04aeb..e6a99d2793b36d567e28e060613bf39a9497f3bd 100644 (file)
@@ -426,6 +426,13 @@ int ptrace_request(struct task_struct *child, long request,
        int ret = -EIO;
 
        switch (request) {
+       case PTRACE_PEEKTEXT:
+       case PTRACE_PEEKDATA:
+               return generic_ptrace_peekdata(child, addr, data);
+       case PTRACE_POKETEXT:
+       case PTRACE_POKEDATA:
+               return generic_ptrace_pokedata(child, addr, data);
+
 #ifdef PTRACE_OLDSETOPTIONS
        case PTRACE_OLDSETOPTIONS:
 #endif