From: Christian Brauner <brauner@kernel.org>
To: Tycho Andersen <tycho@tycho.pizza>
Cc: Yun Zhou <yun.zhou@windriver.com>,
stgraber@stgraber.org, cyphar@cyphar.com,
Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>,
mcgrof@kernel.org, kees@kernel.org, joel.granados@kernel.org,
mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kernel: add pid_max to pid_namespace
Date: Fri, 22 Nov 2024 12:31:17 +0100 [thread overview]
Message-ID: <20241122-hinten-sesshaft-5951878d9374@brauner> (raw)
In-Reply-To: <Zz9E0pGTioTcH32m@tycho.pizza>
On Thu, Nov 21, 2024 at 07:33:54AM -0700, Tycho Andersen wrote:
> On Wed, Nov 20, 2024 at 10:06:27AM +0100, Christian Brauner wrote:
> > On Tue, Nov 05, 2024 at 11:10:24AM +0800, Yun Zhou wrote:
> > > It is necessary to have a different pid_max in different containers.
> > > For example, multiple containers are running on a host, one of which
> > > is Android, and its 32 bit bionic libc only accepts pid <= 65535. So
> > > it requires the global pid_max <= 65535. This will cause configuration
> > > conflicts with other containers and also limit the maximum number of
> > > tasks for the entire system.
> > >
> > > Signed-off-by: Yun Zhou <yun.zhou@windriver.com>
> > > ---
> >
> > Fwiw, I've done a patch like this years ago and then Alex revived it in
> > [1] including selftests! There's downsides to consider:
> >
> > [1]: https://lore.kernel.org/lkml/20240222160915.315255-1-aleksandr.mikhalitsyn@canonical.com
>
> Thanks, looks like this patch has the same oddity.
>
> For me it's enough to just walk up the tree when changing pid_max. It
> seems unlikely that applications will create a sub pidns and then lower
> the max in their own pid_max. Famous last words and all that.
I think we should revive Alex series. Not just because it has selftests
but afaict the implementation is a bit more robust.
next prev parent reply other threads:[~2024-11-22 11:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 3:10 [PATCH v2] kernel: add pid_max to pid_namespace Yun Zhou
2024-11-12 22:33 ` Steven Rostedt
2024-11-19 9:15 ` Joel Granados
2024-11-20 9:06 ` Christian Brauner
2024-11-21 14:33 ` Tycho Andersen
2024-11-22 11:31 ` Christian Brauner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-04 0:54 Yun Zhou
2024-11-04 16:35 ` Steven Rostedt
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=20241122-hinten-sesshaft-5951878d9374@brauner \
--to=brauner@kernel.org \
--cc=aleksandr.mikhalitsyn@canonical.com \
--cc=cyphar@cyphar.com \
--cc=joel.granados@kernel.org \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=stgraber@stgraber.org \
--cc=tycho@tycho.pizza \
--cc=yun.zhou@windriver.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