All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@redhat.com>
Cc: Matt Helsley <matthltc@us.ibm.com>,
	Roland McGrath <roland@redhat.com>,
	Grzegorz Nosek <root@localdomain.pl>,
	Sukadev Bhattiprolu <sukadev@us.ibm.com>,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: Testing lxc 0.6.5 in Fedora 13
Date: Tue, 06 Apr 2010 08:17:21 -0700	[thread overview]
Message-ID: <m1k4sk8vb2.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100406143635.GA12315@redhat.com> (Oleg Nesterov's message of "Tue\, 6 Apr 2010 16\:36\:35 +0200")

Oleg Nesterov <oleg@redhat.com> writes:

> On 04/06, Matt Helsley wrote:
>>
>> On Mon, Apr 05, 2010 at 08:44:43PM -0700, Roland McGrath wrote:
>>
>> > tracehook_report_clone_complete() call is made when that task_struct is no
>> > longer guaranteed to be valid.
>
> Hmm. I missed this.
>
>> Also, if utrace allows multiple tracers and they each
>> exist in a different namespace then storing a pid nr isn't going to work.
>
> Yes, but utrace is simple. ptrace_report_clone() does
>
> 	ctx->eventmsg = child->pid;
>
> we should fix this line and that is all, afaics. Every tracer has a
> separate "struct ptrace_context *ctx".
>
>> So my hunch is, in the long run, we'll need to hold a reference there and
>> drop it when the last tracer detaches
>
> Without utrace only one tracer is possible.
>
> So, I think we should either change do_fork() to get the right tracee_pid_nr,
> or add get/put into do_fork() and change tracehooks as Roland suggested.

For a unicast path where the is no danger of the destination process changing
I don't see why we can't compute the userspace pid_nr.  It only get's tricky
for things like broadcast signals (pgrp, session) when we don't who the
final recipient process will be.

I think that only gets truly bad in the case of unix domain sockets.

Eric

  parent reply	other threads:[~2010-04-06 15:17 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-21 19:50 Testing lxc 0.6.5 in Fedora 13 Grzegorz Nosek
     [not found] ` <20100321195044.GA23757-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-23 21:28   ` Matt Helsley
2010-03-23 21:28 ` Matt Helsley
     [not found]   ` <20100323212834.GH20796-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-24  9:25     ` Greg Kurz
2010-03-25 21:33     ` Grzegorz Nosek
2010-03-25 21:33       ` Grzegorz Nosek
2010-03-26 11:11       ` Oleg Nesterov
2010-03-26 11:32         ` Grzegorz Nosek
2010-03-26 12:00           ` Oleg Nesterov
     [not found]             ` <20100326120028.GA11311-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-26 12:46               ` Matt Helsley
2010-03-26 12:46             ` Matt Helsley
     [not found]               ` <20100326124619.GC3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-26 13:34                 ` Oleg Nesterov
2010-03-26 13:34               ` Oleg Nesterov
     [not found]           ` <20100326113201.GB17113-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-26 12:00             ` Oleg Nesterov
2010-03-26 11:53         ` Matt Helsley
     [not found]           ` <20100326115357.GA3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-26 12:45             ` Grzegorz Nosek
2010-03-26 12:45           ` Grzegorz Nosek
     [not found]             ` <20100326124522.GD17113-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-26 12:54               ` Matt Helsley
2010-03-26 13:47               ` Oleg Nesterov
2010-03-26 12:54             ` Matt Helsley
2010-03-26 13:56               ` Oleg Nesterov
     [not found]               ` <20100326125459.GD3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-03-26 13:56                 ` Oleg Nesterov
2010-03-26 13:47             ` Oleg Nesterov
     [not found]               ` <20100326134709.GB15790-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-04-06  3:44                 ` Roland McGrath
2010-04-06  3:44               ` Roland McGrath
     [not found]                 ` <20100406034443.8B40ED477-nL1rrgvulkc2UH6IwYuUx0EOCMrvLtNR@public.gmane.org>
2010-04-06 13:53                   ` Matt Helsley
2010-04-06 13:53                 ` Matt Helsley
2010-04-06 14:36                   ` Oleg Nesterov
     [not found]                     ` <20100406143635.GA12315-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-04-06 15:17                       ` Eric W. Biederman
2010-04-06 15:17                     ` Eric W. Biederman [this message]
     [not found]                   ` <20100406135345.GC3345-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-04-06 14:36                     ` Oleg Nesterov
2010-04-06 15:13                     ` Eric W. Biederman
2010-04-06 15:13                   ` Eric W. Biederman
2010-04-06 15:29                     ` Matt Helsley
     [not found]                     ` <m1vdc48vhy.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2010-04-06 15:29                       ` Matt Helsley
     [not found]         ` <20100326111131.GA8604-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-26 11:32           ` Grzegorz Nosek
2010-03-26 11:53           ` Matt Helsley
     [not found]       ` <20100325213356.GB20541-yp6mvK3Bdd2rDJvtcaxF/A@public.gmane.org>
2010-03-26 11:11         ` Oleg Nesterov
2010-03-24  9:25   ` Greg Kurz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1k4sk8vb2.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=root@localdomain.pl \
    --cc=sukadev@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.