Re: [PATCH 05/12] fs/proc/task_mmu: write-protect device-private THPs in PAGEMAP_SCAN

From: Gregory Price (Meta)

Date: Fri Nov 13 2026 - 01:13:58 EST


On 2026-11-12 19:34 +0000, Lorenzo Stoakes (ARM) wrote:
> On Wed, Nov 11, 2026 at 12:55:13PM -0500, Tal Zussman wrote:
> > but does nothing for a device-private THP. The PMD never gets the uffd
> > bit.
>
> Sigh yeah. Device-private feels like another 'just have to happen to know to
> update X million open-coded parts of the code'.
>
> We really need to find a way to abstract this stuff.
>

I've poked at it a bit, but zone device creates this issue in many
places. The core issue is really that softleaf can mean 20 things,
and the number of things has been piled on heavily.

I don't know how we solve this, it's just a rats nest of complexity
at this point.

--
~Gregory