Re: [PATCH v3 4/9] mm: keep writable entries writable on protection changes
From: David Hildenbrand (Arm)
Date: Fri Nov 13 2026 - 14:15:57 EST
On 11/12/26 15:20, Carlos López wrote:
> change_protection() applies vma->vm_page_prot, which lacks the write bit
> for CoW and write-notified mappings. MM_CP_TRY_CHANGE_WRITABLE makes
> entries writable again if a write fault would only set the write bit.
> In shared mappings, it relies on the dirty bit for this, as a clean
> entry might still need a write fault to notify the FS.
>
> However, this misses clean entries that were already writable. For
> example, a uffd-wp unprotect makes shmem PTEs read-only if they were
> mapped by a read fault before uffd-wp was registered, so the next write
> to each of them faults.
See my other reply, adding such optimizations without any motivation why we
should even care is not really what we want.
Drop it from your series and keep the MM changes to a bare minimum please.
Or is there a real dependency for your work?
--
Cheers,
David