public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Adrian Reber <areber@redhat.com>
Cc: Christian Brauner <christian@brauner.io>,
	Eric Biederman <ebiederm@xmission.com>,
	Pavel Emelianov <xemul@virtuozzo.com>,
	Jann Horn <jannh@google.com>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	linux-kernel@vger.kernel.org, Andrei Vagin <avagin@gmail.com>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Radostin Stoyanov <rstoyanov1@gmail.com>
Subject: Re: [PATCH v2 1/2] fork: extend clone3() to support CLONE_SET_TID
Date: Fri, 2 Aug 2019 14:47:38 +0200	[thread overview]
Message-ID: <20190802124738.GC20111@redhat.com> (raw)
In-Reply-To: <20190802072511.GD18263@dcbz.redhat.com>

On 08/02, Adrian Reber wrote:
>
> On Wed, Jul 31, 2019 at 07:41:36PM +0200, Oleg Nesterov wrote:
> > But the main question is how it can really help if ns->level > 0, unlikely
> > CRIU will ever need to clone the process with the same pid_nr == set_tid
> > in the ns->parent chain.
>
> Not sure I understand what you mean. For CRIU only the PID in the PID
> namespace is relevant.

If it runs "inside" this namespace. But in this case alloc_pid() should
use nr == set_tid only once in the main loop, when i == ns->level.

It doesn't need to have the same pid_nr in the parent pid namespace.

And in fact we should not allow criu (or anything else) to control the child's
pid_nr in the parent(s) namespace.

Right?

> > So may be kernel_clone_args->set_tid should be pid_t __user *set_tid_array?
> > Or I missed something ?
>
> Not sure why and how an array would be needed. Could you give me some
> more details why you think this is needed.

IIURC, criu can restore the process tree along with nested pid namespaces.

how can this patch help in this case?

But again, perhaps I missed something. I forgot everything about criu.

Oleg.


  reply	other threads:[~2019-08-02 12:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 16:12 [PATCH v2 1/2] fork: extend clone3() to support CLONE_SET_TID Adrian Reber
2019-07-31 16:12 ` [PATCH v2 2/2] selftests: add test for clone3() with set_tid Adrian Reber
2019-07-31 16:49 ` [PATCH v2 1/2] fork: extend clone3() to support CLONE_SET_TID Dmitry Safonov
2019-07-31 16:56   ` Dmitry Safonov
2019-07-31 17:41 ` Oleg Nesterov
2019-08-02  7:25   ` Adrian Reber
2019-08-02 12:47     ` Oleg Nesterov [this message]
2019-08-02 13:02       ` Christian Brauner
2019-08-02 13:24       ` Oleg Nesterov
2019-08-02 13:46         ` Oleg Nesterov
2019-08-02 13:52           ` Christian Brauner
2019-08-02 16:50             ` Adrian Reber
2019-08-02 13:19 ` Christian Brauner
2019-08-02 13:30   ` Oleg Nesterov
2019-08-02 13:50     ` Christian Brauner
2019-08-02 15:10       ` Adrian Reber

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=20190802124738.GC20111@redhat.com \
    --to=oleg@redhat.com \
    --cc=0x7f454c46@gmail.com \
    --cc=areber@redhat.com \
    --cc=avagin@gmail.com \
    --cc=christian@brauner.io \
    --cc=ebiederm@xmission.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rppt@linux.ibm.com \
    --cc=rstoyanov1@gmail.com \
    --cc=xemul@virtuozzo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox