Re: [PATCH] mm/vma: avoid broken uffd merge on mremap
From: Xueyuan Chen
Date: Thu Oct 22 2026 - 07:23:54 EST
On 2026-10-22 11:15 +0100, Lorenzo Stoakes (ARM) wrote:
> 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.
Got it, thanks!
--
Thanks,
Xueyuan