Re: [PATCH 1/3] mm: introduce VM_MAYBE_GUARD and make visible for guard regions
From: Lorenzo Stoakes
Date: Thu Oct 30 2025 - 04:14:52 EST
On Wed, Oct 29, 2025 at 12:50:18PM -0700, Randy Dunlap wrote:
>
> On 10/29/25 9:50 AM, Lorenzo Stoakes wrote:
>
> > diff --git a/mm/memory.c b/mm/memory.c
> > index 4c3a7e09a159..a2c79ee43d68 100644
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > @@ -1478,6 +1478,10 @@ vma_needs_copy(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma)
> > if (src_vma->anon_vma)
> > return true;
> >
> > + /* Guard regions have momdified page tables that require copying. */
>
> modified
I appear to have entered some kind of typo nirvana in this series it seems :)
Thanks, will fix!
>
> > + if (src_vma->vm_flags & VM_MAYBE_GUARD)
> > + return true;
> > +
> > /*
> > * Don't copy ptes where a page fault will fill them correctly. Fork
> > * becomes much lighter when there are big shared or private readonly
> --
> ~Randy
>
Cheers, Lorenzo