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

Jarkko Sakkinen jarkko at kernel.org
Sat Nov 21 19:10:55 UTC 2026


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 at redhat.com>
> Signed-off-by: David Howells <dhowells at redhat.com>
> Signed-off-by: Jarkko Sakkinen <jarkko at kernel.org>

Syscall name is outdated. I'll rename it as container_create(). Does
not have to be final name, but is a better wip name.

Br, Jarkko



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