From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B25E3F99E9 for ; Fri, 27 Mar 2026 17:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774634356; cv=none; b=Bd5Mhzku7Bb7h8/KKIhob6RNIGB0wc07CAGMUsNRiCggzzfW/diyaMV+G01bCxfWYJhDkMvjGUA4/rX6xARAZEK+YLZ7OkpmArOZPmb9eu4S3fVUiMxS/PukJ9GV6shhc/dEXOK01SZwKuaTrF1KartEO1eALoj0Mn6ZOVpRx0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774634356; c=relaxed/simple; bh=rkH5NII5z3tK0xb36uEpDwx6S/rEd1Qc6Bwzt57vQsw=; h=Date:To:From:Subject:Message-Id; b=qGMgHMi7T0p3SkTo+ID/UzxE8QCm7ttdpCv2S+N/M4oG1cv+aN/eagp5tg/x+o2mSQLpSmnNPeWN7MAKs3sGyXgRdrlPDXaqGuO7qoRPXm+A2Yvfbg/JVvvcB9H+dkAknuYulJDkDzlEpwOMfZk/Lo0C1qvTF4RkPh06dQlfiRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=gwU8xb7g; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="gwU8xb7g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E53DC19423; Fri, 27 Mar 2026 17:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774634356; bh=rkH5NII5z3tK0xb36uEpDwx6S/rEd1Qc6Bwzt57vQsw=; h=Date:To:From:Subject:From; b=gwU8xb7gzTWK6Q1l5XEgL17SZQnw8Tz9bhxwIgeNIeudE+4A1TmAEFJ43C0lOjc20 yvcT3CtwMIlXk4Lk4bLlj8ojgTNr66pldZspG3rgaoYmap8CM7lQyvBe3k+d9xOGOZ i5gNHY07kR+JuOKmistYoh3pX5E9cygiOr5XTFKQ= Date: Fri, 27 Mar 2026 10:59:15 -0700 To: mm-commits@vger.kernel.org,sayalip@linux.ibm.com,akpm@linux-foundation.org From: Andrew Morton Subject: [to-be-updated] selftests-mm-skip-uffd-wp-mremap-if-uffd-write-protect-is-unsupported.patch removed from -mm tree Message-Id: <20260327175916.4E53DC19423@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported has been removed from the -mm tree. Its filename was selftests-mm-skip-uffd-wp-mremap-if-uffd-write-protect-is-unsupported.patch This patch was dropped because an updated version will be issued ------------------------------------------------------ From: Sayali Patil Subject: selftests/mm: skip uffd-wp-mremap if UFFD write-protect is unsupported Date: Thu, 12 Mar 2026 17:55:36 +0530 The uffd-wp-mremap test requires the UFFD_FEATURE_PAGEFAULT_FLAG_WP capability. On systems where userfaultfd write-protect is not supported, uffd_register() fails and the test reports failures. Check for the required feature at startup and skip the test when the UFFD_FEATURE_PAGEFAULT_FLAG_WP capability is not present, preventing false failures on unsupported configurations. Before patch: running ./uffd-wp-mremap ------------------------ [INFO] detected THP size: 256 KiB [INFO] detected THP size: 512 KiB [INFO] detected THP size: 1024 KiB [INFO] detected THP size: 2048 KiB [INFO] detected hugetlb page size: 2048 KiB [INFO] detected hugetlb page size: 1048576 KiB 1..24 [RUN] test_one_folio(size=65536, private=false, swapout=false, hugetlb=false) not ok 1 uffd_register() failed [RUN] test_one_folio(size=65536, private=true, swapout=false, hugetlb=false) not ok 2 uffd_register() failed [RUN] test_one_folio(size=65536, private=false, swapout=true, hugetlb=false) not ok 3 uffd_register() failed [RUN] test_one_folio(size=65536, private=true, swapout=true, hugetlb=false) not ok 4 uffd_register() failed [RUN] test_one_folio(size=262144, private=false, swapout=false, hugetlb=false) not ok 5 uffd_register() failed [RUN] test_one_folio(size=524288, private=false, swapout=false, hugetlb=false) not ok 6 uffd_register() failed . . . Bail out! 24 out of 24 tests failed Totals: pass:0 fail:24 xfail:0 xpass:0 skip:0 error:0 [FAIL] not ok 1 uffd-wp-mremap # exit=1 After patch: running ./uffd-wp-mremap ------------------------ 1..0 # SKIP uffd-wp feature not supported [SKIP] ok 1 uffd-wp-mremap # SKIP Link: https://lkml.kernel.org/r/ed23ff57a80881c9d087d22709862af40addf49b.1773305678.git.sayalip@linux.ibm.com Signed-off-by: Sayali Patil Acked-by: Zi Yan Acked-by: David Hildenbrand (Arm) Cc: Dev Jain Cc: Johannes Weiner Cc: Liam Howlett Cc: Lorenzo Stoakes (Oracle) Cc: Miaohe Lin Cc: Michal Hocko Cc: "Michal Koutný" Cc: Muchun Song Cc: Oscar Salvador Cc: "Ritesh Harjani (IBM)" Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Tejun Heo Signed-off-by: Andrew Morton --- tools/testing/selftests/mm/uffd-wp-mremap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- a/tools/testing/selftests/mm/uffd-wp-mremap.c~selftests-mm-skip-uffd-wp-mremap-if-uffd-write-protect-is-unsupported +++ a/tools/testing/selftests/mm/uffd-wp-mremap.c @@ -19,6 +19,17 @@ static size_t thpsizes[20]; static int nr_hugetlbsizes; static size_t hugetlbsizes[10]; +static void uffd_wp_feature_supported(void) +{ + uint64_t features; + + if (uffd_get_features(&features) && errno == ENOENT) + ksft_exit_skip("failed to get available features (%d)\n", errno); + + if (!(features & UFFD_FEATURE_PAGEFAULT_FLAG_WP)) + ksft_exit_skip("uffd-wp feature not supported\n"); +} + static int detect_thp_sizes(size_t sizes[], int max) { int count = 0; @@ -336,6 +347,8 @@ int main(int argc, char **argv) struct thp_settings settings; int i, j, plan = 0; + uffd_wp_feature_supported(); + pagesize = getpagesize(); nr_thpsizes = detect_thp_sizes(thpsizes, ARRAY_SIZE(thpsizes)); nr_hugetlbsizes = detect_hugetlb_page_sizes(hugetlbsizes, _ Patches currently in -mm which might be from sayalip@linux.ibm.com are a.patch selftests-mm-skip-uffd-stress-test-when-nr_pages_per_cpu-is-zero.patch selftests-mm-fix-double-increment-in-linked-list-cleanup-in-compaction_test.patch selftests-mm-move-hwpoison-setup-into-run_test-and-silence-modprobe-output-for-memory-failure-category.patch selftests-cgroup-extend-test_hugetlb_memcgc-to-support-all-huge-page-sizes.patch