Re: [RFC PATCH v9 28/29] selftests/nsexec: Add nsexec test suite

From: Jarkko Sakkinen

Date: Tue Dec 01 2026 - 14:43:39 EST


On Tue, Dec 01, 2026 at 09:29:53PM +0200, Jarkko Sakkinen wrote:
> On Tue, Dec 01, 2026 at 05:10:00AM +0200, Jarkko Sakkinen wrote:
> > Add a model-based stochastic kselftest suite for nsexec_open(),
> > NSEXEC_GET_NSFD, NSEXEC_SHARE_NSFD, waitid(P_NSEXEC),
> > pidfd_send_signal(), userns_set_idmap(), FSCONFIG_SET_NSEXEC,
> > MOVE_MOUNT_T_MNTNS, CLONE_INTO_NSEXEC, and Landlock namespace
> > mediation.
> >
> > Drive lifecycle, ID-mapping, mount-tree, multi-cell supervisor, and
> > Landlock scenarios from a seeded choice stream against a reference uAPI
> > oracle. Each case is a pure function of the seed, scenario, and case
> > index, and shrinking is bounded by attempt count, so NSEXEC_SEED and
> > NSEXEC_CASE replay both a failure and its minimal trace.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
>
> I'm dropping this if there ever will be a new patch version (no need
> for new for the time being, it's as good as it gets for PoC).
>
> What I'm doing now instead is a separate project called ucellsd. It's a
> daemon with libucells + seccomp_unotify runner. ucellsd traps directly
> Cells kernel uAPI and offloads the syscalls to the daemon.
>
> The daemon provides both stock kernel and nsexec code paths for the
> sake of enabling tri-comparative testing.
>
> This way can leave this patch set as it is while at the same time having
> tools for testing issues reported for Cells patch set against my
> implementation.
>
> The other option is to let this just rot, which would be viable if I had
> to take extra length maintaining this but with the new daemon I can
> gradually improve with a low effort.
>
> For the sake of full transparency I'll also write down the lore links of
> addressed issues and add them to the next version of this patch set;
> just in case if there would be a next version.
>
> It's an asymmetric advantage but on fair grounds as it inherits from the
> author-chosen complexity and fluidity properties.

I'll also add Cells in-kernel backend. Then it can six-comparative
testing, which useful even in the case that Cells for whatever reasons
is the way to go.

I.e, you can compare Cells against Cells.

Br, Jarkko