From d7466968cb5c6484a0a24222baed12e0e03937a7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Feb 2026 06:58:05 -0800 Subject: [PATCH] drop mm selftest patch that broke the build --- ...-faulting-in-code-in-pagemap_ioctl-t.patch | 80 ------------------- queue-6.12/series | 1 - ...-faulting-in-code-in-pagemap_ioctl-t.patch | 80 ------------------- queue-6.18/series | 1 - ...-faulting-in-code-in-pagemap_ioctl-t.patch | 80 ------------------- queue-6.19/series | 1 - 6 files changed, 243 deletions(-) delete mode 100644 queue-6.12/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch delete mode 100644 queue-6.18/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch delete mode 100644 queue-6.19/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch diff --git a/queue-6.12/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch b/queue-6.12/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch deleted file mode 100644 index 4a04698236..0000000000 --- a/queue-6.12/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 34073d07beb1eaf3b9d9fc3da363f048d438ccc8 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 22 Jan 2026 17:02:22 +0000 -Subject: selftests/mm: fix faulting-in code in pagemap_ioctl test - -From: Kevin Brodsky - -[ Upstream commit 7e938f00b00319510ae097e20b7487dfa578d53f ] - -One of the pagemap_ioctl tests attempts to fault in pages by memcpy()'ing -them to an unused buffer. This probably worked originally, but since -commit 46036188ea1f ("selftests/mm: build with -O2") the compiler is free -to optimise away that unused buffer and the memcpy() with it. As a result -there might not be any resident page in the mapping and the test may fail. - -We don't need to copy all that memory anyway. Just fault in every page. - -While at it also make sure to compute the number of pages once using -simple integer arithmetic instead of ceilf() and implicit conversions. - -Link: https://lkml.kernel.org/r/20260122170224.4056513-8-kevin.brodsky@arm.com -Fixes: 46036188ea1f ("selftests/mm: build with -O2") -Signed-off-by: Kevin Brodsky -Acked-by: David Hildenbrand (Red Hat) -Reviewed-by: Dev Jain -Reviewed-by: Muhammad Usama Anjum -Cc: Jason Gunthorpe -Cc: John Hubbard -Cc: Lorenzo Stoakes -Cc: Mark Brown -Cc: Paolo Abeni -Cc: Ryan Roberts -Cc: SeongJae Park -Cc: Shuah Khan -Cc: wang lian -Cc: Yunsheng Lin -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - tools/testing/selftests/mm/pagemap_ioctl.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c -index 805017fd9bdbf..c0e4b6a57ce55 100644 ---- a/tools/testing/selftests/mm/pagemap_ioctl.c -+++ b/tools/testing/selftests/mm/pagemap_ioctl.c -@@ -1051,11 +1051,10 @@ static void test_simple(void) - int sanity_tests(void) - { - unsigned long long mem_size, vec_size; -- long ret, fd, i, buf_size; -+ long ret, fd, i, buf_size, nr_pages; - struct page_region *vec; - char *mem, *fmem; - struct stat sbuf; -- char *tmp_buf; - - /* 1. wrong operation */ - mem_size = 10 * page_size; -@@ -1166,14 +1165,14 @@ int sanity_tests(void) - if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); - -- tmp_buf = malloc(sbuf.st_size); -- memcpy(tmp_buf, fmem, sbuf.st_size); -+ nr_pages = (sbuf.st_size + page_size - 1) / page_size; -+ force_read_pages(fmem, nr_pages, page_size); - - ret = pagemap_ioctl(fmem, sbuf.st_size, vec, vec_size, 0, 0, - 0, PAGEMAP_NON_WRITTEN_BITS, 0, PAGEMAP_NON_WRITTEN_BITS); - - ksft_test_result(ret >= 0 && vec[0].start == (uintptr_t)fmem && -- LEN(vec[0]) == ceilf((float)sbuf.st_size/page_size) && -+ LEN(vec[0]) == nr_pages && - (vec[0].categories & PAGE_IS_FILE), - "%s Memory mapped file\n", __func__); - --- -2.51.0 - diff --git a/queue-6.12/series b/queue-6.12/series index bcf51ca92f..f8290476d9 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -213,7 +213,6 @@ pci-add-defines-for-bridge-window-indexing.patch pci-acpi-restrict-program_hpx_type2-to-aer-bits.patch selftests-mm-pagemap_ioctl-fix-types-mismatches-show.patch selftests-mm-convert-page_size-to-unsigned-long.patch -selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch ipc-don-t-audit-capability-check-in-ipc_permissions.patch ucount-check-for-cap_sys_resource-using-ns_capable_n.patch of-unittest-fix-possible-null-pointer-dereferences-i.patch diff --git a/queue-6.18/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch b/queue-6.18/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch deleted file mode 100644 index 40b2c5073c..0000000000 --- a/queue-6.18/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch +++ /dev/null @@ -1,80 +0,0 @@ -From cf3c9df2152c243b7a0ca14a5be3fb58ae08ae64 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 22 Jan 2026 17:02:22 +0000 -Subject: selftests/mm: fix faulting-in code in pagemap_ioctl test - -From: Kevin Brodsky - -[ Upstream commit 7e938f00b00319510ae097e20b7487dfa578d53f ] - -One of the pagemap_ioctl tests attempts to fault in pages by memcpy()'ing -them to an unused buffer. This probably worked originally, but since -commit 46036188ea1f ("selftests/mm: build with -O2") the compiler is free -to optimise away that unused buffer and the memcpy() with it. As a result -there might not be any resident page in the mapping and the test may fail. - -We don't need to copy all that memory anyway. Just fault in every page. - -While at it also make sure to compute the number of pages once using -simple integer arithmetic instead of ceilf() and implicit conversions. - -Link: https://lkml.kernel.org/r/20260122170224.4056513-8-kevin.brodsky@arm.com -Fixes: 46036188ea1f ("selftests/mm: build with -O2") -Signed-off-by: Kevin Brodsky -Acked-by: David Hildenbrand (Red Hat) -Reviewed-by: Dev Jain -Reviewed-by: Muhammad Usama Anjum -Cc: Jason Gunthorpe -Cc: John Hubbard -Cc: Lorenzo Stoakes -Cc: Mark Brown -Cc: Paolo Abeni -Cc: Ryan Roberts -Cc: SeongJae Park -Cc: Shuah Khan -Cc: wang lian -Cc: Yunsheng Lin -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - tools/testing/selftests/mm/pagemap_ioctl.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c -index 4fc8e578ec7c3..8978ab0b45a7a 100644 ---- a/tools/testing/selftests/mm/pagemap_ioctl.c -+++ b/tools/testing/selftests/mm/pagemap_ioctl.c -@@ -1052,11 +1052,10 @@ static void test_simple(void) - int sanity_tests(void) - { - unsigned long long mem_size, vec_size; -- long ret, fd, i, buf_size; -+ long ret, fd, i, buf_size, nr_pages; - struct page_region *vec; - char *mem, *fmem; - struct stat sbuf; -- char *tmp_buf; - - /* 1. wrong operation */ - mem_size = 10 * page_size; -@@ -1167,14 +1166,14 @@ int sanity_tests(void) - if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); - -- tmp_buf = malloc(sbuf.st_size); -- memcpy(tmp_buf, fmem, sbuf.st_size); -+ nr_pages = (sbuf.st_size + page_size - 1) / page_size; -+ force_read_pages(fmem, nr_pages, page_size); - - ret = pagemap_ioctl(fmem, sbuf.st_size, vec, vec_size, 0, 0, - 0, PAGEMAP_NON_WRITTEN_BITS, 0, PAGEMAP_NON_WRITTEN_BITS); - - ksft_test_result(ret >= 0 && vec[0].start == (uintptr_t)fmem && -- LEN(vec[0]) == ceilf((float)sbuf.st_size/page_size) && -+ LEN(vec[0]) == nr_pages && - (vec[0].categories & PAGE_IS_FILE), - "%s Memory mapped file\n", __func__); - --- -2.51.0 - diff --git a/queue-6.18/series b/queue-6.18/series index ed0b599726..bbf6f19e20 100644 --- a/queue-6.18/series +++ b/queue-6.18/series @@ -286,7 +286,6 @@ wifi-ath12k-clear-stale-link-mapping-of-ahvif-links_.patch pci-initialize-rcb-from-pci_configure_device.patch pci-acpi-restrict-program_hpx_type2-to-aer-bits.patch selftests-mm-fix-usage-of-force_read-in-cow-tests.patch -selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch ipc-don-t-audit-capability-check-in-ipc_permissions.patch ucount-check-for-cap_sys_resource-using-ns_capable_n.patch jfs-avoid-wtautological-constant-out-of-range-compar.patch diff --git a/queue-6.19/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch b/queue-6.19/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch deleted file mode 100644 index d20b93e3cb..0000000000 --- a/queue-6.19/selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 365e2de33bfca616a389a0342f7e6fa3f8b75a06 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 22 Jan 2026 17:02:22 +0000 -Subject: selftests/mm: fix faulting-in code in pagemap_ioctl test - -From: Kevin Brodsky - -[ Upstream commit 7e938f00b00319510ae097e20b7487dfa578d53f ] - -One of the pagemap_ioctl tests attempts to fault in pages by memcpy()'ing -them to an unused buffer. This probably worked originally, but since -commit 46036188ea1f ("selftests/mm: build with -O2") the compiler is free -to optimise away that unused buffer and the memcpy() with it. As a result -there might not be any resident page in the mapping and the test may fail. - -We don't need to copy all that memory anyway. Just fault in every page. - -While at it also make sure to compute the number of pages once using -simple integer arithmetic instead of ceilf() and implicit conversions. - -Link: https://lkml.kernel.org/r/20260122170224.4056513-8-kevin.brodsky@arm.com -Fixes: 46036188ea1f ("selftests/mm: build with -O2") -Signed-off-by: Kevin Brodsky -Acked-by: David Hildenbrand (Red Hat) -Reviewed-by: Dev Jain -Reviewed-by: Muhammad Usama Anjum -Cc: Jason Gunthorpe -Cc: John Hubbard -Cc: Lorenzo Stoakes -Cc: Mark Brown -Cc: Paolo Abeni -Cc: Ryan Roberts -Cc: SeongJae Park -Cc: Shuah Khan -Cc: wang lian -Cc: Yunsheng Lin -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - tools/testing/selftests/mm/pagemap_ioctl.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c -index 2cb5441f29c72..1896c7d4f72ee 100644 ---- a/tools/testing/selftests/mm/pagemap_ioctl.c -+++ b/tools/testing/selftests/mm/pagemap_ioctl.c -@@ -1052,11 +1052,10 @@ static void test_simple(void) - int sanity_tests(void) - { - unsigned long long mem_size, vec_size; -- long ret, fd, i, buf_size; -+ long ret, fd, i, buf_size, nr_pages; - struct page_region *vec; - char *mem, *fmem; - struct stat sbuf; -- char *tmp_buf; - - /* 1. wrong operation */ - mem_size = 10 * page_size; -@@ -1167,14 +1166,14 @@ int sanity_tests(void) - if (fmem == MAP_FAILED) - ksft_exit_fail_msg("error nomem %d %s\n", errno, strerror(errno)); - -- tmp_buf = malloc(sbuf.st_size); -- memcpy(tmp_buf, fmem, sbuf.st_size); -+ nr_pages = (sbuf.st_size + page_size - 1) / page_size; -+ force_read_pages(fmem, nr_pages, page_size); - - ret = pagemap_ioctl(fmem, sbuf.st_size, vec, vec_size, 0, 0, - 0, PAGEMAP_NON_WRITTEN_BITS, 0, PAGEMAP_NON_WRITTEN_BITS); - - ksft_test_result(ret >= 0 && vec[0].start == (uintptr_t)fmem && -- LEN(vec[0]) == ceilf((float)sbuf.st_size/page_size) && -+ LEN(vec[0]) == nr_pages && - (vec[0].categories & PAGE_IS_FILE), - "%s Memory mapped file\n", __func__); - --- -2.51.0 - diff --git a/queue-6.19/series b/queue-6.19/series index 7339798997..51700f398b 100644 --- a/queue-6.19/series +++ b/queue-6.19/series @@ -379,7 +379,6 @@ pci-initialize-rcb-from-pci_configure_device.patch pci-acpi-restrict-program_hpx_type2-to-aer-bits.patch revert-net-smc-introduce-tcp-ulp-support.patch selftests-mm-fix-usage-of-force_read-in-cow-tests.patch -selftests-mm-fix-faulting-in-code-in-pagemap_ioctl-t.patch ipc-don-t-audit-capability-check-in-ipc_permissions.patch ucount-check-for-cap_sys_resource-using-ns_capable_n.patch jfs-avoid-wtautological-constant-out-of-range-compar.patch -- 2.47.3