From: Roland McGrath Date: Wed, 30 Jan 2008 12:31:47 +0000 (+0100) Subject: x86: ptrace_request peekdata/pokedata X-Git-Tag: v2.6.25-rc1~1143^2~516 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16c3e389e7a7254ff8dc7029ac4fbe996c3c75bf;p=linux-2.6 x86: ptrace_request peekdata/pokedata 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 Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 973d727f5e..e6a99d2793 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -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