Re: [RFC PATCH v7 00/26] userland: Userland containers

From: Jarkko Sakkinen

Date: Mon Nov 23 2026 - 22:38:04 EST


On Tue, Nov 24, 2026 at 03:28:19AM +0200, Jarkko Sakkinen wrote:
> On Tue, Nov 24, 2026 at 03:19:36AM +0200, Jarkko Sakkinen wrote:
> > On Sun, Nov 22, 2026 at 09:35:13PM +0200, Jarkko Sakkinen wrote:
> > > SYSCALLS
> > > ========
> > >
> > > Two new system calls are proposed:
> > >
> > > 1. userland_open(): open an opaque staircase-initialized container
> > > object (modeled on Intel SGX enclave initialization with separate
> > > build and live states) with no embryonic state, opting selected
> > > shared namespaces in via an allow-list instead of unshare semantics.
> > > 2. userns_set_idmap(): configure all UID, GID, and project ID map
> > > extents for a container user namespace in a single atomic system
> > > call.
> >
> > I played on patching systemd and userns_set_idmap() alone does already
> > a lot of good. I'm figuring out userland_open() integration next.
> >
> > For the test implementation I probe the opcode's and dependening on that
~~~~~~~~
syscalls

> > use either "userland path" or "fallback path".
> >
> > This auto-probing is done so that I can commit the patches to my kernel
> > test harness, which already has systemd, and try them out when built
> > against userland-enabled kernel (via LINUX_OVERRIDE_SRCDIR):
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd-test.git/tree/?h=main
> >
> > The project builds a hybrid ISO, which is a bootable bootc/composefs
> > based operating system, and has toolbx bundled i.e., a reasonable test
> > environment for all of this. It is also device-installable via "npx
> > @puu/install"
> >
> > I had to level the harness up a lot so that I could realistically test
> > lockdown-hibernate but it is is also pretty good emulation environment
> > for any possible container features.
>
> Kernel is ukified and systemd-boot is used as the boot loader i.e., for
> kernel testing purposes corresponds to something like Silverblue except
> not using GRUB.

Experimental systemd patches:

https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd-test.git/commit/?h=main&id=e4d6b15da3376ad09c0c575cedf467f69db32a52

The patches are layered per syscall feature:

- 1-5: userns_set_idmap
- 6-10: userland_open()

Virtual device would add path/mount complexity and generally dependency
to mounts i.e., I think it was an awful idea. At least initially this
feels fairly lean way of doing container things now that I've trialed
systemd-nspawn a bit.

I'll update the patches over time.

Br, Jarkko