diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-30 07:30:51 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:51 -0500 |
commit | 18982c158f9c255d437713e63a93270d07408674 (patch) | |
tree | 382bc4757687c61e80f89d3c4a89cd558105b828 | |
parent | 36df29d7994180cf7f0ccc5d46495855d56d2721 (diff) |
x86-64: ptrace generic resume
This removes the handling for PTRACE_CONT et al from the 64-bit
ptrace code, so it uses the new generic code via ptrace_request.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/ptrace_64.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c index 035d53e99c57..b129b1fbb5d9 100644 --- a/arch/x86/kernel/ptrace_64.c +++ b/arch/x86/kernel/ptrace_64.c | |||
@@ -334,23 +334,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
334 | } | 334 | } |
335 | break; | 335 | break; |
336 | } | 336 | } |
337 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | ||
338 | case PTRACE_CONT: /* restart after signal. */ | ||
339 | |||
340 | ret = -EIO; | ||
341 | if (!valid_signal(data)) | ||
342 | break; | ||
343 | if (request == PTRACE_SYSCALL) | ||
344 | set_tsk_thread_flag(child,TIF_SYSCALL_TRACE); | ||
345 | else | ||
346 | clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE); | ||
347 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); | ||
348 | child->exit_code = data; | ||
349 | /* make sure the single step bit is not set. */ | ||
350 | user_disable_single_step(child); | ||
351 | wake_up_process(child); | ||
352 | ret = 0; | ||
353 | break; | ||
354 | 337 | ||
355 | #ifdef CONFIG_IA32_EMULATION | 338 | #ifdef CONFIG_IA32_EMULATION |
356 | /* This makes only sense with 32bit programs. Allow a | 339 | /* This makes only sense with 32bit programs. Allow a |
@@ -378,34 +361,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
378 | ret = do_arch_prctl(child, data, addr); | 361 | ret = do_arch_prctl(child, data, addr); |
379 | break; | 362 | break; |
380 | 363 | ||
381 | /* | ||
382 | * make the child exit. Best I can do is send it a sigkill. | ||
383 | * perhaps it should be put in the status that it wants to | ||
384 | * exit. | ||
385 | */ | ||
386 | case PTRACE_KILL: | ||
387 | ret = 0; | ||
388 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
389 | break; | ||
390 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); | ||
391 | child->exit_code = SIGKILL; | ||
392 | /* make sure the single step bit is not set. */ | ||
393 | user_disable_single_step(child); | ||
394 | wake_up_process(child); | ||
395 | break; | ||
396 | |||
397 | case PTRACE_SINGLESTEP: /* set the trap flag. */ | ||
398 | ret = -EIO; | ||
399 | if (!valid_signal(data)) | ||
400 | break; | ||
401 | clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE); | ||
402 | user_enable_single_step(child); | ||
403 | child->exit_code = data; | ||
404 | /* give it a chance to run. */ | ||
405 | wake_up_process(child); | ||
406 | ret = 0; | ||
407 | break; | ||
408 | |||
409 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 364 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ |
410 | if (!access_ok(VERIFY_WRITE, (unsigned __user *)data, | 365 | if (!access_ok(VERIFY_WRITE, (unsigned __user *)data, |
411 | sizeof(struct user_regs_struct))) { | 366 | sizeof(struct user_regs_struct))) { |