Re: [RFC PATCH v8 00/29] userland: Userland containers
From: Jarkko Sakkinen
Date: Sat Nov 28 2026 - 22:38:41 EST
On Sun, Nov 29, 2026 at 04:35:03AM +0200, Jarkko Sakkinen wrote:
> On Sun, Nov 29, 2026 at 01:57:39AM +0200, Jarkko Sakkinen wrote:
> > WIRING
> > ======
> >
> > Experimental userspace integrations probe userns_set_idmap() and
> > userland_open() at runtime and fall back to
> > /proc/<pid>/{setgroups,uid_map,gid_map} and classic namespace cloning on
> > older kernels:
> >
> > 1. SystemD: atomic ID mapping via userns_set_idmap(), systemd-nspawn
> > bootstrap via userland_open(), USERLAND_SHARE_NSFD,
> > MOVE_MOUNT_T_MNTNS, and clone3(CLONE_INTO_USERLAND), plus live
> > systemd-machined bind mounts and udev device hotplug.
> > https://github.com/jarkkojs/systemd/commits/userland
> > 2. Bubblewrap: opportunistic userns_set_idmap() and direct sandbox mount
> > population via userland_open(), FSCONFIG_SET_USERLAND,
> > MOVE_MOUNT_T_MNTNS, and clone3(CLONE_INTO_USERLAND) without
> > pivot_root().
> > https://github.com/jarkkojs/bubblewrap/commits/userland
> > 3. Podman: opportunistic userns_set_idmap() and a built-in "userland"
> > runtime (--runtime=userland, also used opportunistically for default
> > pod infra containers) backed by userland_open(), MOVE_MOUNT_T_MNTNS,
> > CLONE_INTO_USERLAND, waitid(P_USERLAND), and pidfd_send_signal().
> > https://github.com/jarkkojs/podman/commits/userland
>
> Two important pratical consequences:
>
> 1. Userland features can be upgraded gradually across OS stack.
> 2. Given the self-contained nature of the syscalls, they are relatively
> easy to backport e.g., for enterprise kernels.
Also, container upgrades work naturally with this scheme as old and
new versions can hang to their own userland fd's, and there's proper
staging before the live state.
This type of extreme fluidity made me like David's approach and makes
me like this even more given vast improvement over that already great
groundwork.
Br, Jarkko