The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Kiryl Shutsemau <kirill@shutemov.name>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: akpm@linux-foundation.org, usama.anjum@collabora.com,
	 peterx@redhat.com, liam@infradead.org, ljs@kernel.org,
	vbabka@kernel.org,  jannh@google.com, pfalcato@suse.de,
	rppt@kernel.org, surenb@google.com,  mhocko@suse.com,
	shuah@kernel.org, linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,  stable@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH v4] fs/proc/task_mmu: fix PAGEMAP_SCAN written state for PMD holes
Date: Wed, 15 Jul 2026 15:08:15 +0100	[thread overview]
Message-ID: <aleT2uw9glPnKiqv@thinkstation> (raw)
In-Reply-To: <f5700c45-9eab-47e1-946c-47d9a531bfeb@kernel.org>

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

      reply	other threads:[~2026-07-15 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13  9:17 [PATCH v4] fs/proc/task_mmu: fix PAGEMAP_SCAN written state for PMD holes Kiryl Shutsemau
2026-07-15 13:47 ` David Hildenbrand (Arm)
2026-07-15 14:08   ` Kiryl Shutsemau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aleT2uw9glPnKiqv@thinkstation \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jannh@google.com \
    --cc=kernel-team@meta.com \
    --cc=liam@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=peterx@redhat.com \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=usama.anjum@collabora.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox