Re: [PATCH] use ptrace_get_task_struct in various places

From: Andrew Morton
Date: Thu Nov 10 2005 - 19:00:13 EST


Christoph Hellwig <hch@xxxxxx> wrote:
>
> > In arch/ia64/ia32/sys_ia32.c this patch will cause PTRACE_TRACEME requests
> > to be handled by ptrace_request()
>
> you mean ptrace_get_task_struct?

No, I was referring to this code:

asmlinkage long
sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data)
{
struct task_struct *child;
unsigned int value, tmp;
long i, ret;

lock_kernel();
if (request == PTRACE_TRACEME) {
ret = sys_ptrace(request, pid, addr, data);
goto out;
}

Your patch removes the PTRACE_TRACEME special-case. Consequently
sys32_ptrace() will fall all the way down to the default: case of the
switch statement and will use ptrace_request() instead. And
ptrace_request() doesn't handle PTRACE_TRACEME, so I think it's busted.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/