diff options
author | Christoph Hellwig <hch@lst.de> | 2010-03-10 18:22:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:38 -0500 |
commit | b3c1e01a09d6af2dd7811a066ffcfc5171be2bed (patch) | |
tree | e59bb3618ed20fe05caba4c8cb7e292b7b2559b1 /arch/m68knommu | |
parent | 7baab93f9297da3e42a8cecfbf91d5f22f415500 (diff) |
ptrace: use ptrace_request() in the remaining architectures
Use ptrace_request() in the three remaining architectures that didn't use it
(m68knommu, h8300, microblaze). This means:
- ptrace_request now handles PTRACE_{PEEK,POKE}{TEXT,DATA} and PTRACE_DETATCH
calls that were previously called directly, or in case of h8300 even open
coded.
- adds new support for PTRACE_SETOPTIONS/PTRACE_GETEVENTMSG/
PTRACE_GETSIGINFO/PTRACE_SETSIGINFO
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Michal Simek <monstr@monstr.eu>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68knommu')
-rw-r--r-- | arch/m68knommu/kernel/ptrace.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 85ed2f988f98..b100394813a7 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -116,12 +116,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
116 | int ret; | 116 | int ret; |
117 | 117 | ||
118 | switch (request) { | 118 | switch (request) { |
119 | /* when I and D space are separate, these will need to be fixed. */ | ||
120 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | ||
121 | case PTRACE_PEEKDATA: | ||
122 | ret = generic_ptrace_peekdata(child, addr, data); | ||
123 | break; | ||
124 | |||
125 | /* read the word at location addr in the USER area. */ | 119 | /* read the word at location addr in the USER area. */ |
126 | case PTRACE_PEEKUSR: { | 120 | case PTRACE_PEEKUSR: { |
127 | unsigned long tmp; | 121 | unsigned long tmp; |
@@ -160,12 +154,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
160 | break; | 154 | break; |
161 | } | 155 | } |
162 | 156 | ||
163 | /* when I and D space are separate, this will have to be fixed. */ | ||
164 | case PTRACE_POKETEXT: /* write the word at location addr. */ | ||
165 | case PTRACE_POKEDATA: | ||
166 | ret = generic_ptrace_pokedata(child, addr, data); | ||
167 | break; | ||
168 | |||
169 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 157 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
170 | ret = -EIO; | 158 | ret = -EIO; |
171 | if ((addr & 3) || addr < 0 || | 159 | if ((addr & 3) || addr < 0 || |
@@ -258,10 +246,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
258 | break; | 246 | break; |
259 | } | 247 | } |
260 | 248 | ||
261 | case PTRACE_DETACH: /* detach a process that was attached. */ | ||
262 | ret = ptrace_detach(child, data); | ||
263 | break; | ||
264 | |||
265 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 249 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ |
266 | int i; | 250 | int i; |
267 | unsigned long tmp; | 251 | unsigned long tmp; |
@@ -325,7 +309,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
325 | break; | 309 | break; |
326 | 310 | ||
327 | default: | 311 | default: |
328 | ret = -EIO; | 312 | ret = ptrace_request(child, request, addr, data); |
329 | break; | 313 | break; |
330 | } | 314 | } |
331 | return ret; | 315 | return ret; |