Re: [LTP] [PATCH] userfaultfd03.c: Require kernel 6.1

Cyril Hrubis
2026-03-30T14:59:22Z

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.

Does not work either, the /dev/userfaultfd was added without any changes
in CONFIG. If we wanted this as generic funcitionality we would have to
add .needs_devices field into tst_test structure but as far as I my
grepping shows, usefaultfd is at the moment the only test that depends
on a device that has been added recently so it does not look like
it's worth the trouble.

--
Cyril Hrubis
chrubis@suse.cz