From: Andrei Vagin <avagin@gmail.com>
To: Alexey Izbyshev <izbyshev@ispras.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Florian Weimer <fweimer@redhat.com>,
Christian Brauner <brauner@kernel.org>,
Dmitry Safonov <0x7f454c46@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Kees Cook <keescook@chromium.org>
Subject: Re: Potentially undesirable interactions between vfork() and time namespaces
Date: Fri, 2 Sep 2022 10:20:57 -0700 [thread overview]
Message-ID: <YxI7ec9S1CB0sDju@gmail.com> (raw)
In-Reply-To: <b14a9802e171b3148c62f6193d08fa92@ispras.ru>
On Fri, Sep 02, 2022 at 07:39:28PM +0300, Alexey Izbyshev wrote:
<snip>
> > > @@ -2043,18 +2043,6 @@ static __latent_entropy struct task_struct
> > > *copy_process(
> > > return ERR_PTR(-EINVAL);
> > > }
> > >
> > > - /*
> > > - * If the new process will be in a different time namespace
> > > - * do not allow it to share VM or a thread group with the forking
> > > task.
> > > - *
> > > - * On vfork, the child process enters the target time namespace only
> > > - * after exec.
> > > - */
> > > - if ((clone_flags & (CLONE_VM | CLONE_VFORK)) == CLONE_VM) {
> > > - if (nsp->time_ns != nsp->time_ns_for_children)
> > > - return ERR_PTR(-EINVAL);
> > > - }
> >
> > pls don't remove this part. It was one of the concerns that vfork
> > doesn't work after unshare(CLONE_NEWTIME), but it is one of the standard
> > ways of creating a new process. For example, posix_spawn uses it.
> >
> What do you mean? On the contrary, removing this restriction of the original
> time namespace implementation allows vfork(), pthread_create() and the like,
> solving the issue with posix_spawn() as well.
>
Sorry, I was not woken up completely and decided that it just reverted
the change that allows vfork. Now, I see that it removes this
restriction completely. So it looks good to me.
Thanks,
Andrei.
next prev parent reply other threads:[~2022-09-02 17:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 19:49 Alexey Izbyshev
2022-08-31 1:18 ` Andrei Vagin
2022-09-01 3:45 ` Andrei Vagin
2022-09-01 4:21 ` Florian Weimer
2022-09-01 15:49 ` Alexey Izbyshev
2022-09-01 18:11 ` Eric W. Biederman
2022-09-02 16:14 ` Andrei Vagin
2022-09-02 16:39 ` Alexey Izbyshev
2022-09-02 17:20 ` Andrei Vagin [this message]
2022-09-02 17:01 ` Alexey Izbyshev
2022-09-02 17:28 ` Andrei Vagin
2022-09-06 22:16 ` Eric W. Biederman
2022-09-07 5:33 ` Alexey Izbyshev
2022-09-07 17:15 ` Andrei Vagin
2022-09-08 8:10 ` Christian Brauner
2022-09-08 22:13 ` Eric W. Biederman
2022-09-09 7:51 ` Christian Brauner
2022-09-11 15:12 ` Kees Cook
2022-09-11 22:51 ` Andrei Vagin
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=YxI7ec9S1CB0sDju@gmail.com \
--to=avagin@gmail.com \
--cc=0x7f454c46@gmail.com \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=fweimer@redhat.com \
--cc=izbyshev@ispras.ru \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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