[LTP] [PATCH] userfaultfd05: handle kernels rejecting WP feature in UFFDIO_API

Petr Vorel pvorel@suse.cz
Fri Jan 23 13:25:45 CET 2026


> > Yes, for the discussion when to use I'd propose to *not* use kconfig 
Maybe to correct myself:

*Use* kconfig if there is no other way to detect the functionality [1].
We prefer to use kconfig detection, but do *not* use kconfig when there is
another way to detect the functionality (e.g. via detecting functionality via
/proc|sys) *and* and one of these three rules:

> > * boot parameter to enable/disable exist
* allow to disable via kernel boot parameter or via /sys file
=> because it can be disabled
> > * check for tristate (functionality which can be compiled as module)
=> modul might not be available
> > * kernel new functionality which is unlikely to be backported (use .min_kver instead)
=> probably faster

> That sounds great to me.

Thank you!

> And, plus one more:
>    * kconfig file may be unavailable for some reasons

Yes, but we gave up on this (or at least Cyril) [1]:

	As for the missing config there is 95 testcases that have needs_kconfigs
	set at this moment and the number is growing steadily. I would argue
	that you cannot run LTP without having config available. And the config
	location is autodetected on common distributions as well.

me: + at least 2 IMA tests require kconfig via tst_require_kconfigs().

Therefore I accepted it and I'm not against using kconfig. But I would prefer
using it only when it works reliably (100%).

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/aV6DCbns02E4BCTj@yuki.lan/


More information about the ltp mailing list