[LTP] [PATCH] userfaultfd03.c: Require kernel 6.1
Petr Vorel
pvorel@suse.cz
Fri Mar 27 17:44:59 CET 2026
> Hi!
> > > > > Nothing besides trying to fix 6.11 (which was not the case) and trying to
> > > > > simplify. But whole effort is somehow relevant to general checking test
> > > > > requirements cleanup (we had a discussion runtime checks vs. kconfig/min_kver
> > > > > which resulted in Cyril's "lib: tst_kconfig: Add runtime checks" [2]).
> > > > I guess that the check for all userfaultfd tests should be moved to the
> > > > tst_kconfig.c once my patch that adds runtime checks there is in.
> > > Or I can send a V3 that adds that check as well.
> > Sure, having /dev/userfaultfd in kconfig check would be a benefit. Thanks!
> However it looks like we cannot do that, the /dev/userfaultfd was added
> into 6.1 while the usefaultfd syscall existed since 4.3. Hence tests
> that need /dev/userfaultfd need additional checks.
We require for userfaultfd05.c also CONFIG_HAVE_ARCH_USERFAULTFD_WP=y.
Maybe bound /dev/userfaultfd check to it? OTOH
CONFIG_HAVE_ARCH_USERFAULTFD_WP=y is much older (v5.19-rc1) and original commit
in 6.1 [1] does not refer to it.
Also, general note about .needs_kconfig callbacks: I'm glad you chose TINFO
for "%s=%c present but disabled at runtime" message which is always visible,
because people will not expect runtime checks.
Kind regards,
Petr
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d5de004e009
> However it may be a good idea to add .needs_kconfig to all the
> userfaultfd tests we have.
+1. 4 of them does not have it.
Kind regards,
Petr
More information about the ltp
mailing list