selftests-mm-introduce-uffd-wp-mremap-regression-test.patch removed from -mm tree
The quilt patch titled
Subject: selftests/mm: introduce uffd-wp-mremap regression test
has been removed from the -mm tree. Its filename was
selftests-mm-introduce-uffd-wp-mremap-regression-test.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Ryan Roberts <[email protected]>
Subject: selftests/mm: introduce uffd-wp-mremap regression test
Date: Tue, 7 Jan 2025 14:47:53 +0000
Introduce a test that registers a range of memory for UFFDIO_WRITEPROTECT_MODE_WP without UFFD_FEATURE_EVENT_REMAP. First check that the uffd-wp bit is set for every PTE in the range. Then mremap() the range to a new location and check that the uffd-wp bit is clear for every PTE in the range.
Run the test for small folios, all supported THP sizes and all supported hugetlb sizes, and for swapped out memory, shared and private.
There was previously a bug in the kernel where the uffd-wp bits remained set in all PTEs for this case, after fixing the kernel, the tests all pass.
---
tools/testing/selftests/mm/.gitignore | 1 tools/testing/selftests/mm/Makefile | 2 tools/testing/selftests/mm/run_vmtests.sh | 1 tools/testing/selftests/mm/uffd-wp-mremap.c | 380 ++++++++++++++++++ 4 files changed, 384 insertions(+)
tools/testing/selftests/mm/.gitignore renamed from tools/testing/selftests/mm/.gitignore~selftests-mm-introduce-uffd-wp-mremap-regression-test +1 -0
@@ -27,6 +27,7 @@ protection_keys_64 madv_populate uffd-stress uffd-unit-tests +uffd-wp-mremap mlock-intersect-test mlock-random-test virtual_address_range
tools/testing/selftests/mm/Makefile renamed from tools/testing/selftests/mm/Makefile~selftests-mm-introduce-uffd-wp-mremap-regression-test +2 -0
@@ -88,6 +88,7 @@ TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += uffd-stress TEST_GEN_FILES += uffd-unit-tests +TEST_GEN_FILES += uffd-wp-mremap TEST_GEN_FILES += split_huge_page_test TEST_GEN_FILES += ksm_tests TEST_GEN_FILES += ksm_functional_tests
@@ -158,6 +159,7 @@ $(TEST_GEN_FILES): vm_util.c thp_setting $(OUTPUT)/uffd-stress: uffd-common.c $(OUTPUT)/uffd-unit-tests: uffd-common.c +$(OUTPUT)/uffd-wp-mremap: uffd-common.c $(OUTPUT)/protection_keys: pkey_util.c $(OUTPUT)/pkey_sighandler_tests: pkey_util.c
tools/testing/selftests/mm/run_vmtests.sh renamed from tools/testing/selftests/mm/run_vmtests.sh~selftests-mm-introduce-uffd-wp-mremap-regression-test +1 -0
@@ -309,6 +309,7 @@ CATEGORY="userfaultfd" run_test ${uffd_s CATEGORY="userfaultfd" run_test ${uffd_stress_bin} hugetlb-private "$half_ufd_size_MB" 32 CATEGORY="userfaultfd" run_test ${uffd_stress_bin} shmem 20 16 CATEGORY="userfaultfd" run_test ${uffd_stress_bin} shmem-private 20 16 +CATEGORY="userfaultfd" run_test ./uffd-wp-mremap #cleanup echo "$nr_hugepgs" > /proc/sys/vm/nr_hugepages
tools/testing/selftests/mm/uffd-wp-mremap.c new file +380 -0
380 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are