On Wed, Jul 15, 2026 at 03:47:00PM +0200, David Hildenbrand (Arm) wrote: > > > > MADV_DONTNEED has fill-with-zeros semantics: it changes the contents of > > the range to zeroes (a subsequent read maps the zero page), which write > > Only in MAP_PRIVATE | MAP_ANON mappings.
Right, I'll scope the fill-with-zeros wording to MAP_PRIVATE|MAP_ANON. The fix itself isn't anon-specific -- it covers any non-hugetlb uffd-wp VMA (anon and shmem); the invariant is just "unpopulated => written", matching pte_none in pagemap_page_category(). I'll spell that out, along with the WP_UNPOPULATED marker mechanism (a missing marker == the range was MADV_DONTNEED'd). > Do we really want to backport a test case? Usually we split them from the > actual > fix. Agreed -- v5 will split it. The rest goes into v5: your shorter comment, reuse of unpopulated_scan_test()'s sequence, recover instead of ksft_exit on the mmap failure, and rename to unpopulated_thp_scan_test(). -- Kiryl Shutsemau / Kirill A. Shutemov

