Re: [PATCH v4 06/14] mm: preserve RWP marker across PTE rewrites
From: Kiryl Shutsemau
Date: Tue May 26 2026 - 04:19:30 EST
On Mon, May 25, 2026 at 04:07:15PM +0100, Kiryl Shutsemau wrote:
> On Mon, May 25, 2026 at 12:08:19PM +0000, sashiko-bot@xxxxxxxxxx wrote:
> > Pre-existing issues:
> > - [High] Failure to write-protect the destination PTE in
> > copy_present_page() completely bypasses UFFD_WP tracking for pinned
> > pages.
>
> Confirmed and pre-existing -- copy_present_page() builds the dest PTE
> with maybe_mkwrite(pte_mkdirty(pte), dst_vma) and only adds the UFFD
> bit, never wrprotects. Will address in a separate fix after this
> series.
Looking closer, this is false alarm. pte_mkuffd() makes the PTE
write-protected. No change needed.
--
Kiryl Shutsemau / Kirill A. Shutemov