[LTP] [PATCH] ioctl_pidfd02-06: Add CONFIG_USER_NS and CONFIG_PID_NS to needs_kconfigs
Petr Vorel
pvorel@suse.cz
Thu Jan 8 14:31:47 CET 2026
> On Wed, Jan 7, 2026 at 5:15 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> > Hi!
> > > Thanks for your input. I understand that you're for replacing in ioctl_ns06.c:
> > > int exists = access("/proc/self/ns/user", F_OK);
> > > if (exists < 0)
> > > tst_res(TCONF, "namespace not available");
> > > with .needs_kconfigs:
> > > .needs_kconfigs = (const char *[]) {
> > > "CONFIG_USER_NS",
> > > NULL
> > > }
> > > Because that was my question - really always prefer kconfig even there is a
> > > simple runtime solution? I'd like to have some "rule" like conclusion we can
> > > point during review.
> > I think that from a long term view this is going to be simpler solution
> > than having many different types of checks. The less diverse these
> > checks are the easier they are to review and maintain. Hence I lean
> > towards kernel config checks even though they are slower (mostly
> > unmeasurable on today's harware) than the alternatives.
> I think I lean opposite way, and rather have a check for right
> environment to support the test.
> You can have feature X enabled in kernel config, but still disabled
> later at boot/runtime
> (e.g. max_user_namespaces=0), or a module simply not being loaded.
+1, all "tristate" configured as module might be missing. (openSUSE JeOS suffers
with this when minimal kernel is installed).
But "bool" are safe unless depend on "tristate" configured as module (not the
case of CONFIG_USER_NS).
Kind regards,
Petr
> > --
> > Cyril Hrubis
> > chrubis@suse.cz
More information about the ltp
mailing list