mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tycho Andersen <tycho@tycho.pizza>
To: Christian Brauner <brauner@kernel.org>
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: Thu, 21 Nov 2024 07:33:54 -0700	[thread overview]
Message-ID: <Zz9E0pGTioTcH32m@tycho.pizza> (raw)
In-Reply-To: <20241120-entgiften-geldhahn-a9d2922ec3e0@brauner>

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.

Tycho

  reply	other threads:[~2024-11-21 14:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  3:10 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 [this message]
2024-11-22 11:31     ` Christian Brauner
  -- 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=Zz9E0pGTioTcH32m@tycho.pizza \
    --to=tycho@tycho.pizza \
    --cc=aleksandr.mikhalitsyn@canonical.com \
    --cc=brauner@kernel.org \
    --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=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

all inboxes | Powered by JetHome®