]> git.ipfire.org Git - thirdparty/linux.git/commit
mm: update uffd-stress to handle EINVAL for unset config features
authorAudra Mitchell <audra@redhat.com>
Wed, 26 Jun 2024 13:05:12 +0000 (09:05 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 5 Jul 2024 01:05:58 +0000 (18:05 -0700)
commita47a7af9b5118442dcfd2214a810033948a579ec
tree6cd273f00ce59a8473ade69239c4939246ba7aed
parent8ac5dc66599c5c545cefd314dd34a109edce2784
mm: update uffd-stress to handle EINVAL for unset config features

Now that we have updated userfaultfd_api to correctly return EINVAL when a
feature is requested but not available, let's fix the uffd-stress test to
only set the UFFD_FEATURE_WP_UNPOPULATED feature when the config is set.
In addition, still run the test if the CONFIG_PTE_MARKER_UFFD_WP is not
set, just dont use the corresponding UFFD_FEATURE_WP_UNPOPULATED feature.

Link: https://lkml.kernel.org/r/20240626130513.120193-2-audra@redhat.com
Signed-off-by: Audra Mitchell <audra@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Rafael Aquini <raquini@redhat.com>
Cc: Shaohua Li <shli@fb.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-stress.c