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

Petr Vorel
2026-03-27T09:05:31Z

Hi all,

TL;DR: refusing my patch. I'm sorry for the noise.

> On Thu, Mar 26, 2026 at 01:52:15PM +0100, Petr Vorel wrote:
> > Required kernel functionality was added in kernel 6.1 (not 6.11)

> - int res = (tst_kvercmp(6, 1, 0) < 0) ? TCONF : TBROK;
First of all, I'm sorry. I was somehow blind to see kernel check above as 6.11,
of course it is 6.1. That was the main idea about this patch.

> > 2d5de004e009 ("userfaultfd: add /dev/userfaultfd for fine grained access control")

> > Because it's a new kernel functionality which has not been backported to
> > enterprise kernels we can simplify check with just .min_kver.

> > Fixes: b63ab54aee ("userfaultfd: Do not use min_kver as gate for test")
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi all,

> > @Li I suppose RHEL kernel haven't backport this.

> Why do you lack confidence in RHEL? haha :)

Lol :). No, just my bad memory and info being on a different place.

> I have confimed that both RHEL 9 and 10 have backported this
> feature (commit 2d5de004e009).

I'm sorry, I have forgotten it. Now I remember you did some related
contributions but 1) that were in userfaultfd05.c (different file), 2) while
this info is in patch on ML [1] instead of it 1840ee23d1 ("userfaultfd05:
require CONFIG_HAVE_ARCH_USERFAULTFD_WP") was merged which does not have this
info.

Having written a reason for things being done differently helps to keep things
not being accidentally removed (or realize it's no longer needed and can be
removed). It's enough to have the info in git log (not everything has to be
documented as a comment in the code). Having it in elsewhere (PR description,
different patch) usually means the info is lost. Also finding the relevant
discussion is why I put Link: tag with URL to patch in lore (yes, I trust lore
archive more than our mailing list archive).

Not everything needs to be in form of a comment in the code, but it's
helps to find the reason if it's at least in git log.

> As RHEL 9 is based on an older kernel(5.14) but includes this
> backport, changing this to .min_kver = "6.1" will cause the
> test to be incorrectly skipped (TCONF) on RHEL 9 systems.

Thanks for info. Of course it will stay. But it'd be good to comment
"needed for RHEL 9" in the test (unfortunately it's not in the commit message).

> Anyway, back to the topic, what is the point of creating this patch?
> Anything I missed?

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]).

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/20260123054056.131992-1-liwang@redhat.com/
[2] https://patchwork.ozlabs.org/project/ltp/patch/20260326144006.3035-1-chrubis@suse.cz/