diff options
author | Tony Luck <tony.luck@intel.com> | 2005-11-07 09:05:22 -0800 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-11-07 09:05:22 -0800 |
commit | 0ad3a96f8ad910ecf87a25ec69ed360b284dee2e (patch) | |
tree | 12d292fd58fc0f7a3eb56c89dfc23569f3ab6c00 /arch/arm/kernel/ptrace.c | |
parent | f79b348856fbaf77e4a0c5cb08a808e5879967a9 (diff) | |
parent | 5b2f7ffcb734d3046144dfbd5ac6d76254a9e522 (diff) | |
download | linux-0ad3a96f8ad910ecf87a25ec69ed360b284dee2e.tar.gz linux-0ad3a96f8ad910ecf87a25ec69ed360b284dee2e.tar.bz2 linux-0ad3a96f8ad910ecf87a25ec69ed360b284dee2e.zip |
Auto-update from upstream
Diffstat (limited to 'arch/arm/kernel/ptrace.c')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 9bd8609a2926..9a340e790da5 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -648,7 +648,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) #endif -static int do_ptrace(int request, struct task_struct *child, long addr, long data) +long arch_ptrace(struct task_struct *child, long request, long addr, long data) { unsigned long tmp; int ret; @@ -782,53 +782,6 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat return ret; } -asmlinkage long sys_ptrace(long request, long pid, long addr, long data) -{ - struct task_struct *child; - int ret; - - lock_kernel(); - ret = -EPERM; - if (request == PTRACE_TRACEME) { - /* are we already being traced? */ - if (current->ptrace & PT_PTRACED) - goto out; - ret = security_ptrace(current->parent, current); - if (ret) - goto out; - /* set the ptrace bit in the process flags. */ - current->ptrace |= PT_PTRACED; - ret = 0; - goto out; - } - ret = -ESRCH; - read_lock(&tasklist_lock); - child = find_task_by_pid(pid); - if (child) - get_task_struct(child); - read_unlock(&tasklist_lock); - if (!child) - goto out; - - ret = -EPERM; - if (pid == 1) /* you may not mess with init */ - goto out_tsk; - - if (request == PTRACE_ATTACH) { - ret = ptrace_attach(child); - goto out_tsk; - } - ret = ptrace_check_attach(child, request == PTRACE_KILL); - if (ret == 0) - ret = do_ptrace(request, child, addr, data); - -out_tsk: - put_task_struct(child); -out: - unlock_kernel(); - return ret; -} - asmlinkage void syscall_trace(int why, struct pt_regs *regs) { unsigned long ip; |