[LTP] [Valgrind-developers] [PATCH] Make userfaultfd0{1, 3, 4} LTP tests valgrind compatible

Ricardo Branco rbranco@suse.de
Wed Apr 22 09:54:34 CEST 2026



On 4/22/26 7:37 AM, Petr Vorel wrote:
>> However, some of the testcases can be easily changed to use forked
>> processes instead of threads.  That's what this patch does.  When
>> client program forks, Valgrind forks too, and that allows for the needed
>> parallelism to handle the page fault.
> You understand process vs. threads more than me. But shouldn't mmap() use
> MAP_SHARED instead of MAP_PRIVATE for those which aren't using /dev/userfaultfd?

The documentation for userfaultfd mentions threads.  I'm afraid we'll
lose vital coverage if we move to forked processes.

Perhaps we should cover both?

Also checkout UFFD_FEATURE_EVENT_FORK and the BUGS section for this in
userfaultfd(2).
I have like 3 patches for userfaultfd that I'm afraid I'd have to rebase 
then.\ Best,
Ricardo


More information about the ltp mailing list