From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, Jingyi Sun <1045704958@qq.com>,
"Liam R. Howlett" <liam@infradead.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
Michal Hocko <mhocko@suse.com>,
Muhammad Usama Anjum <usama.anjum@arm.com>,
Peter Xu <peterx@redhat.com>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
nvdimm@lists.linux.dev
Subject: Re: [PATCH 0/3] mm/memory: fix handling of PTE markers in insert_page_into_pte_locked()
Date: Tue, 17 Nov 2026 21:19:20 +0100 [thread overview]
Message-ID: <71899695-4dcc-4875-80c0-bbcb224d43e2@kernel.org> (raw)
In-Reply-To: <avyri3PoPUriTmxN@kernel.org>
On 11/17/26 20:31, Mike Rapoport wrote:
> On Tue, Nov 17, 2026 at 05:22:09PM +0100, David Hildenbrand (Arm) wrote:
>> On 11/17/26 16:58, Mike Rapoport (Microsoft) wrote:
>>> Jingyi reported that a uffd-wp marker in a DAX mapping causes endless
>>> refaults on reads and SIGBUS on writes [1].
>>>
>>> The root cause is that insert_page_into_pte_locked() treats every PTE that
>>> is not none as a present mapping. Besides uffd-wp markers, this also
>>> affects guard markers that MADV_GUARD_INSTALL can put into a DAX mapping
>>> concurrently with a write fault.
>>>
>>> The first patch restructures insert_page_into_pte_locked() to make room
>>> for the fixes, the second patch fixes the reported issue and the third
>>> makes write faults back off on non-present PTEs.
>>>
>>> Both issues were reproduced on ext4 with dax=always on emulated pmem, and
>>> the fixes were verified with these reproducers.
>>> selftests.
>>>
>>> [1] https://lore.kernel.org/all/tencent_1874C71D4177A1624528043E008DB1A5EF05@qq.com
>>>
>>> ---
>>> Mike Rapoport (Microsoft) (3):
>>> mm/memory: install new PTEs first in insert_page_into_pte_locked()
>>> mm/memory: replace uffd-wp markers in insert_page_into_pte_locked()
>>> mm/memory: don't upgrade non-present PTEs in insert_page_into_pte_locked()
>>>
>>> mm/memory.c | 68 +++++++++++++++++++++++++++++++------------------------------
>>> 1 file changed, 35 insertions(+), 33 deletions(-)
>>> ---
>>> base-commit: 93d7a816a2df3e907e2719bd12b0073f1285fc5c
>>> change-id: 20261117-uffd-dax-async-wp-fix-867acc8dc78f
>>>
>>> --
>>> Sincerely yours,
>>> Mike.
>>
>>
>> I have here a fix to disallow uffd on DAX entirely. It's completely broken.
>>
>> I was staging it to send with others, but I can send it out separately.
>
> Nah, no need.
>
> But patch 3/3 here is for MADV_GUARD_INSTALL on DAX unrelated to uffd.
Let me take a look at that tomorrow. But for 1 and 2 we should just reject uffd
registration.
--
Cheers,
David
prev parent reply other threads:[~2026-11-17 20:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 15:58 Mike Rapoport (Microsoft)
2026-11-17 15:58 ` [PATCH 1/3] mm/memory: install new PTEs first " Mike Rapoport (Microsoft)
2026-11-17 15:58 ` [PATCH 2/3] mm/memory: replace uffd-wp markers " Mike Rapoport (Microsoft)
2026-11-17 15:58 ` [PATCH 3/3] mm/memory: don't upgrade non-present PTEs " Mike Rapoport (Microsoft)
2026-11-17 16:22 ` [PATCH 0/3] mm/memory: fix handling of PTE markers " David Hildenbrand (Arm)
2026-11-17 19:31 ` Mike Rapoport
2026-11-17 20:19 ` David Hildenbrand (Arm) [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=71899695-4dcc-4875-80c0-bbcb224d43e2@kernel.org \
--to=david@kernel.org \
--cc=1045704958@qq.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=nvdimm@lists.linux.dev \
--cc=peterx@redhat.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=usama.anjum@arm.com \
--cc=vbabka@kernel.org \
--cc=willy@infradead.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
all inboxes | Powered by JetHome®