[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090527234330.GA12216@redhat.com>
Date: Thu, 28 May 2009 01:43:30 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Roland McGrath <roland@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Pavel Emelyanov <xemul@...nvz.org>,
Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] ptrace: do_notify_parent_cldstop: fix the wrong
->nsproxy usage
On 05/27, Roland McGrath wrote:
>
> > No, task_pid_vnr(current) in ptrace_notify() is not right. If the tracer
> > does PTRACE_GETSIGINFO it gets the wrong .si_pid.
>
> I don't follow. PTRACE_GETSIGINFO gets the tracee's siginfo_t data--modulo
> 32/64 conversions it's the data structure the tracee process sees on its
> stack when running a handler. It's not like a signal sent into the
> tracer's queue (like SIGCHLD in do_notify_*), where the kernel doing
> translation to the tracer's context makes sense. It's more like some
> memory you read from the tracee.
Yes, but the (minor and low priority) problem is that .si_pid recorded
in ->last_siginfo does not match the tracee's pid from the tracer pov
(if they run in different namespaces).
Suppose that that we trace the task from the sub-namespace. We see its
pid == 100, but when this tracee calls ptrace_notify() it does
info.si_pid = task_pid_vnr(current), and task_pid_vnr() returns (say) 10.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists