[RFC PATCH 00/13] Namespace for namespace roots

Jarkko Sakkinen jarkko at kernel.org
Tue Nov 17 18:48:55 UTC 2026


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.

> 
> --Andy
> -- 
> Andy Lutomirski
> AMA Capital Management, LLC

Br, Jarkko



More information about the Linux-security-module-archive mailing list