aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-04-30 07:38:49 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-04-30 07:38:48 -0400
commit941af343e2e25ff7afce43a3c7e2922643b8cd48 (patch)
tree49f9e2f8e38e70af8f3876f833f8dc1c3ab923a0
parent613e1def6b52c399a8b72a5e11bc2e57d2546fb8 (diff)
[S390] use generic sys_ptrace
After the PT_IEEE_IP hack has been removed s390 can now use the common code sys_ptrace function. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/ptrace.c37
-rw-r--r--include/asm-s390/ptrace.h2
2 files changed, 1 insertions, 38 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 9dbaef44e8ec..7f4270163744 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -607,18 +607,8 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
607} 607}
608#endif 608#endif
609 609
610static int 610long arch_ptrace(struct task_struct *child, long request, long addr, long data)
611do_ptrace(struct task_struct *child, long request, long addr, long data)
612{ 611{
613 int ret;
614
615 if (request == PTRACE_ATTACH)
616 return ptrace_attach(child);
617
618 ret = ptrace_check_attach(child, request == PTRACE_KILL);
619 if (ret < 0)
620 return ret;
621
622 switch (request) { 612 switch (request) {
623 case PTRACE_SYSCALL: 613 case PTRACE_SYSCALL:
624 /* continue and stop at next (return from) syscall */ 614 /* continue and stop at next (return from) syscall */
@@ -673,31 +663,6 @@ do_ptrace(struct task_struct *child, long request, long addr, long data)
673 return -EIO; 663 return -EIO;
674} 664}
675 665
676asmlinkage long
677sys_ptrace(long request, long pid, long addr, long data)
678{
679 struct task_struct *child;
680 int ret;
681
682 lock_kernel();
683 if (request == PTRACE_TRACEME) {
684 ret = ptrace_traceme();
685 goto out;
686 }
687
688 child = ptrace_get_task_struct(pid);
689 if (IS_ERR(child)) {
690 ret = PTR_ERR(child);
691 goto out;
692 }
693
694 ret = do_ptrace(child, request, addr, data);
695 put_task_struct(child);
696out:
697 unlock_kernel();
698 return ret;
699}
700
701asmlinkage void 666asmlinkage void
702syscall_trace(struct pt_regs *regs, int entryexit) 667syscall_trace(struct pt_regs *regs, int entryexit)
703{ 668{
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h
index 61f6952f2e35..441d7c260857 100644
--- a/include/asm-s390/ptrace.h
+++ b/include/asm-s390/ptrace.h
@@ -463,8 +463,6 @@ struct user_regs_struct
463}; 463};
464 464
465#ifdef __KERNEL__ 465#ifdef __KERNEL__
466#define __ARCH_SYS_PTRACE 1
467
468/* 466/*
469 * These are defined as per linux/ptrace.h, which see. 467 * These are defined as per linux/ptrace.h, which see.
470 */ 468 */