|
@@ -153,7 +153,6 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs)
|
|
|
|
|
|
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|
|
{
|
|
|
- unsigned long tmp;
|
|
|
int ret;
|
|
|
|
|
|
pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n",
|
|
@@ -166,11 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|
|
/* Read the word at location addr in the child process */
|
|
|
case PTRACE_PEEKTEXT:
|
|
|
case PTRACE_PEEKDATA:
|
|
|
- ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
|
|
|
- if (ret == sizeof(tmp))
|
|
|
- ret = put_user(tmp, (unsigned long __user *)data);
|
|
|
- else
|
|
|
- ret = -EIO;
|
|
|
+ ret = generic_ptrace_peekdata(child, addr, data);
|
|
|
break;
|
|
|
|
|
|
case PTRACE_PEEKUSR:
|