linux/tools
Kiryl Shutsemau (Meta) fb0493ad1a selftests/mm: add PAGEMAP_SCAN test for THP PMD holes
Add coverage for the PMD-hole case fixed by "fs/proc/task_mmu: fix
PAGEMAP_SCAN written state for PMD holes": a MAP_PRIVATE|MAP_ANON THP that
is uffd-wp'd and then dropped with MADV_DONTNEED leaves a pmd_none hole
with no page table, which PAGEMAP_SCAN must still report as written.

Factor the populate/drop/scan-both-paths sequence out of
unpopulated_scan_test() into a helper, and add unpopulated_thp_scan_test()
that reuses it with a THP.

Include <linux/mman.h> for MADV_COLLAPSE; <sys/mman.h> lacks it on older
glibc (e.g. 2.34). Same approach as commit fd5295afae ("selftests/mm:
hmm-tests: include linux/mman.h to access MADV_COLLAPSE").

Link: https://lore.kernel.org/aljWYfPRCVc6IB2b@thinkstation
Link: https://lore.kernel.org/20260715144234.442721-3-kirill@shutemov.name
Signed-off-by: Kiryl Shutsemau <kas@kernel.org>
Cc: Muhammad Usama Anjum <usama.anjum@arm.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Zenghui Yu <zenghui.yu@linux.dev>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Assisted-by: Claude:claude-fable-5
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-06 18:57:10 -07:00
..
accounting tools/accounting/getdelays: fix -Wformat-truncation warning in format_timespec 2026-05-28 21:24:40 -07:00
arch tools headers: Sync KVM headers with the kernel sources 2026-07-21 21:00:10 -03:00
bootconfig Bootconfig updates for v7.2 2026-06-16 17:29:24 +05:30
bpf bpftool: Fix vmlinux BTF leak in cgroup commands 2026-06-21 18:02:10 -07:00
build perf tools changes for v7.2: 2026-06-23 11:34:49 -07:00
certs
cgroup
counter
crypto
debugging
dma
docs
firewire
firmware
gpio
hv tools: hv: Fix cross-compilation 2026-04-14 04:43:26 +00:00
iio iio: core: Add IIO_COVERAGE channel type 2026-05-31 11:01:50 +01:00
include selftests/mm: add userfaultfd RWP tests 2026-08-04 19:18:39 -07:00
kvm/kvm_stat
laptop
leds
lib A handful of late-arriving docs fixes, along with one document update 2026-06-25 09:09:38 -07:00
memory-model
mm tools/mm/page_owner_sort: bound pattern output copies 2026-07-30 19:40:50 -07:00
net tools/ynl: add missing uapi header deps in Makefile.deps 2026-06-24 19:30:55 -07:00
objtool objtool/rust: add one more noreturn Rust function for Rust 1.99.0 2026-07-11 14:20:54 +02:00
pcmcia
perf tools headers: Sync UAPI linux/fs.h with the kernel sources 2026-07-21 21:00:10 -03:00
power platform-drivers-x86 for v7.2-1 2026-06-23 08:31:33 -07:00
rcu
sched
sched_ext tools/sched_ext: scx - Fix cmask_subset(), cmask_equal() and cmask_weight() 2026-07-09 11:08:41 -10:00
scripts Kbuild/Kconfig updates for 7.1 2026-04-14 09:18:40 -07:00
sound
spi
testing selftests/mm: add PAGEMAP_SCAN test for THP PMD holes 2026-08-06 18:57:10 -07:00
thermal
time
tracing rtla: Also link in ctype.c 2026-07-08 10:38:18 +02:00
unittests docs: kernel-doc: python: strip __counted_by_ptr macro 2026-05-15 08:11:36 -06:00
usb usbip: tools: support SuperSpeedPlus devices 2026-07-08 13:29:13 +02:00
verification verification/rvgen: Fix ltl2k writing True as a literal 2026-06-04 16:44:25 +02:00
virtio tools/virtio: add missing compat definitions for vhost_net_test 2026-07-01 19:02:56 -07:00
wmi
workqueue
writeback
Makefile