Re: [RFC PATCH 00/13] Namespace for namespace roots

From: Jarkko Sakkinen

Date: Tue Nov 17 2026 - 14:11:02 EST


On Tue, Nov 17, 2026 at 08:48:59PM +0200, Jarkko Sakkinen wrote:
> On Tue, Nov 17, 2026 at 09:44:43AM -0800, Andy Lutomirski wrote:
> > Can you clarify what this new API actually does? I've read this three
> > times, and the best understanding I've come up with is that you've
> > designed a way to create a group of namespaces identified by an fd and
> > you're adding an API to configure and enter them cleanly. Which
> > sounds very sensible. But I'm completely confused as to why a
> > namespace needs to be owned by a "rootns" or why that ownership
> > affects even newly created sub-namespaces.
>
> I think this would postulate the patch set:
>
> 1. A subset of detached namespaces.
> 2. A dedicated PID namespace for spawning into, signaling members, and
> polling/waiting on init exit.
> 3. Initially an empty mount mount namespace that must be populated
> before going live.
>
> I had to do some head scratching for the second question as I've worked
> seriously on this already some time ago but I think it was as follows.
>
> If recall it correctly, rootns ownership tracking was meant to stop
> processes inside a rootns from calling setns() into host or other
> namespaces of the other containers.
>
> However, user_namespace already enforces namespace ownership for
> setns(), and adding a separate rootns check prevents legitimately
> entering a shared external namespace (such as a pre-created netns).
>
> I will drop the rootns ownership tracking.

While the patch set itself is manually coded, I got inspired by LLM
agents back then. It was quite clear that in the near future OCI
runtimes should try to minimize the live configuration surface.

Another force was that whatever the solution ever can be it should be
made migration friendly for OCI runtimes. This led to the conclusion
that we need yet another namespace instead of a fully parallel
framework.

Br, Jarkko