Re: [PATCH] mm/vma: avoid broken uffd merge on mremap
From: Lorenzo Stoakes (ARM)
Date: Tue Oct 20 2026 - 13:26:58 EST
On Tue, Oct 20, 2026 at 06:03:03PM +0100, Kiryl Shutsemau wrote:
> On Tue, Oct 20, 2026 at 05:51:12PM +0200, David Hildenbrand (Arm) wrote:
> > @Kiryl that should solve the issue I was raising the other day with leftover
> > uffd PTE bits outside of uffd areas? Can you review?
>
> Yes, it is the same copy_vma() merge.
>
> With the merge refused, the reset in mremap_userfaultfd_prep() only
> covers the moved range, and move_ptes() has already cleared the uffd
> bits there.
Yes, that's my understanding also.
>
> Reviewed-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
Thanks!
>
> P.S. vma_has_uffd_without_event_remap() is a mouthful. With negation in
> the name...
Yeah, I thought so too, but a pre-existing mouthful :) could do with a rename at
some point though!
--
Cheers, Lorenzo