Re: [PATCH] mm/vma: avoid broken uffd merge on mremap

From: Lorenzo Stoakes (ARM)

Date: Thu Oct 22 2026 - 06:21:19 EST


On Thu, Oct 22, 2026 at 05:56:51PM +0800, Xueyuan Chen wrote:

> > diff --git a/tools/testing/vma/include/stubs.h b/tools/testing/vma/include/stubs.h
> > index be8f5161f92a..f786a585caf0 100644
> > --- a/tools/testing/vma/include/stubs.h
> > +++ b/tools/testing/vma/include/stubs.h

> > +static inline bool vma_has_uffd_without_event_remap(struct vm_area_struct *vma)
> > +{
> > + return false;
> > +}
> > +
>
> Would it make sense to have the stub in tools/testing/vma/include/stubs.h
> return a configurable bool, e.g. uffd_without_event_remap, and add a test
> for the true case? The existing tests would continue to cover the false case.

No, stubs.h are for simple stubs.

Changes like that would be only be made if needed.

>
> Reviewed-by: Xueyuan Chen <xueyuan.chen21@xxxxxxxxx>

Thanks!

--
Cheers, Lorenzo