Re: [RFC PATCH v5 13/25] rootns: Add rootns() system call

From: Jarkko Sakkinen

Date: Sat Nov 21 2026 - 14:12:55 EST


On Sat, Nov 21, 2026 at 09:10:59PM +0200, Jarkko Sakkinen wrote:
> On Sat, Nov 21, 2026 at 02:08:32AM +0200, Jarkko Sakkinen wrote:
> > Setting up an isolated namespace environment from a multithreaded
> > manager process currently requires helper processes to call unshare()
> > and pass file descriptors back over sockets.
> >
> > Add the rootns() system call to allocate a detached rootns instance
> > owning a fresh user namespace alongside dedicated empty mount
> > (CLONE_EMPTY_MNTNS), PID, UTS, IPC, network, cgroup, and time
> > namespaces, and return its control file descriptor. Finalize the nsproxy
> > time namespace and pin active references for the lifetime of the rootns.
> >
> > Co-developed-by: David Howells <dhowells@xxxxxxxxxx>
> > Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> > Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
>
> Syscall name is outdated. I'll rename it as container_create(). Does
> not have to be final name, but is a better wip name.

Something more non-generic as it inevitably would collide to something
(did not check). I'll figure something out.

Br, Jarkko