From: Kees Cook <keescook@chromium.org>
To: yunhui cui <cuiyunhui@bytedance.com>, brauner@kernel.org
Cc: jeffxu@google.com, akpm@linux-foundation.org, cyphar@cyphar.come,
mcgrof@kernel.org, frederic@kernel.org,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Discuss the implementation of pidns_install()
Date: Mon, 9 Oct 2023 13:08:05 -0700 [thread overview]
Message-ID: <202310091307.CB416B950@keescook> (raw)
In-Reply-To: <CAEEQ3wnfOOpKAKGt07cFv1Du-NaFOzX_=yeQZfD6VNojpPFTqA@mail.gmail.com>
On Wed, Sep 20, 2023 at 05:37:20PM +0800, yunhui cui wrote:
> Hi Kees, jeff, Andrew, Christian,
>
> We hope that containers at the same level can also switch pid namespace.
> To fork() the entire pstree of a container, we need to switch from the pid
> namespace of the template container to the target container's pid
> namespace. But it is blocked by the following code:
>
> ...
> while (ancestor->level > active->level)
> ancestor = ancestor->parent;
> if (ancestor != active)
> return -EINVAL;
> ...
>
> Can we give this code permission, such as CAP_SYS_ADMIN ..., so that those
> with this permission can switch to sibling pid namespace. Rather than just
> parent, parent ...
>
> Do you think this plan is okay? Or can you give me some suggestions?
I'll defer to Christian on this, but it seems like moving processes
sideways is kind of unexpected. I agree it'd need privilege if we did
it, though.
--
Kees Cook
next parent reply other threads:[~2023-10-09 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEEQ3wnfOOpKAKGt07cFv1Du-NaFOzX_=yeQZfD6VNojpPFTqA@mail.gmail.com>
2023-10-09 20:08 ` Kees Cook [this message]
2023-10-10 3:29 ` [External] Re: Discuss the implementation of pidns_install() yunhui cui
2023-10-11 1:46 ` yunhui cui
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=202310091307.CB416B950@keescook \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=cuiyunhui@bytedance.com \
--cc=cyphar@cyphar.come \
--cc=frederic@kernel.org \
--cc=jeffxu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.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