From: "Garg, Shivank" <shivankg@amd.com>
To: "usama.anjum@arm.com" <usama.anjum@arm.com>,
"nico.pache@linux.dev" <nico.pache@linux.dev>,
"rppt@kernel.org" <rppt@kernel.org>,
"shuah@kernel.org" <shuah@kernel.org>,
"Rao, Bharata Bhasker" <bharata@amd.com>,
"yintirui@gmail.com" <yintirui@gmail.com>,
"vbabka@kernel.org" <vbabka@kernel.org>,
"emmir@google.com" <emmir@google.com>,
"danjwade95@gmail.com" <danjwade95@gmail.com>,
"david@kernel.org" <david@kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"dev.jain@arm.com" <dev.jain@arm.com>,
"pgofman@codeweavers.com" <pgofman@codeweavers.com>,
"surenb@google.com" <surenb@google.com>,
"peterx@redhat.com" <peterx@redhat.com>,
"usama.arif@linux.dev" <usama.arif@linux.dev>,
"kas@kernel.org" <kas@kernel.org>,
"ziy@nvidia.com" <ziy@nvidia.com>,
"ryan.roberts@arm.com" <ryan.roberts@arm.com>,
"baohua@kernel.org" <baohua@kernel.org>,
"liam@infradead.org" <liam@infradead.org>,
"mhocko@suse.com" <mhocko@suse.com>,
"ljs@kernel.org" <ljs@kernel.org>,
"lance.yang@linux.dev" <lance.yang@linux.dev>,
"baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
"wine-devel@winehq.org" <wine-devel@winehq.org>,
"avagin@gmail.com" <avagin@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] mm: fix soft-dirty false positives in mprotect() of large folios
Date: Wed, 25 Nov 2026 16:11:51 +0000 [thread overview]
Message-ID: <8b1a6f9da685a0e0ef44c67e92e98e37f37bd42f.camel@amd.com> (raw)
In-Reply-To: <0308f0ef-9989-4a9b-aaa4-2a3169ac1f02@codeweavers.com>
On Wed, 2026-11-25 at 09:42 -0600, Paul Gofman wrote:
> On 11/25/26 07:43, David Hildenbrand (Arm) wrote:
> > On 11/25/26 14:32, Shivank Garg wrote:
> > > mprotect() handles the PTEs of a large folio as one batch, and marks the
> > > whole batch dirty with pte_mkdirty() if any of its PTEs is dirty. On
> > > x86, powerpc, riscv and s390, pte_mkdirty() also sets the soft-dirty
> > > bit, so after clear_refs, mprotect() marks unwritten pages soft-dirty.
> > > With 64K mTHP on x86-64, all 240 unwritten pages of a 1MiB region are
> > > reported soft-dirty; with my fix, none are.
> > Why do we care? Just over-indicate soft-dirty. It's valid, and the whole feature
> > is full of holes and buggy as hell.
> >
> Do I understand correctly that these issues only affect the old soft
> dirty feature and not UFFD WP async (UFFD_FEATURE_WP_ASYNC)?
> Over-indicating written pages with the newer UFFD support is not
> expected and Wine usage of the feature requires that. But I guess it is
> not what is concerned here?
Yes, right. This only affect the soft-dirty bit, and not uffd-wp feature.
prev parent reply other threads:[~2026-11-25 16:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 13:32 Shivank Garg
2026-11-25 13:32 ` [PATCH 1/3] mm: move the soft-dirty fallbacks up in pgtable.h Shivank Garg
2026-11-25 13:32 ` [PATCH 2/3] mm: don't let modify_prot_start_ptes() set soft-dirty on clean PTEs Shivank Garg
2026-11-25 13:32 ` [PATCH 3/3] selftests/mm: soft-dirty: check that mprotect() keeps PTE-mapped THPs clean Shivank Garg
2026-11-25 13:43 ` [PATCH 0/3] mm: fix soft-dirty false positives in mprotect() of large folios David Hildenbrand (Arm)
2026-11-25 14:16 ` Garg, Shivank
2026-11-25 15:42 ` Paul Gofman
2026-11-25 16:11 ` Garg, Shivank [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=8b1a6f9da685a0e0ef44c67e92e98e37f37bd42f.camel@amd.com \
--to=shivankg@amd.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@gmail.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bharata@amd.com \
--cc=danjwade95@gmail.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=emmir@google.com \
--cc=kas@kernel.org \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.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=nico.pache@linux.dev \
--cc=peterx@redhat.com \
--cc=pgofman@codeweavers.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=usama.anjum@arm.com \
--cc=usama.arif@linux.dev \
--cc=vbabka@kernel.org \
--cc=wine-devel@winehq.org \
--cc=yintirui@gmail.com \
--cc=ziy@nvidia.com \
/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®