[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <awqb5pkf5fvrlz5shphy26zlbeopw6oc7blpm2rdcceszqzjce@lamh3fx3ldzi>
Date: Mon, 14 Jul 2025 11:43:57 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>, Vlastimil Babka <vbabka@...e.cz>,
Jann Horn <jannh@...gle.com>, Pedro Falcato <pfalcato@...e.de>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Jeff Xu <jeffxu@...omium.org>
Subject: Re: [PATCH 4/5] mm/mseal: separate out and simplify VMA gap check
* Lorenzo Stoakes <lorenzo.stoakes@...cle.com> [250714 11:40]:
> On Mon, Jul 14, 2025 at 11:35:44AM -0400, Liam R. Howlett wrote:
> > * Lorenzo Stoakes <lorenzo.stoakes@...cle.com> [250714 09:08]:
> > > The check_mm_seal() function is doing something general - checking whether
> > > a range contains only VMAs (or rather that it does NOT contain any unmapped
> > > regions).
> > >
> > > Generalise this and put the logic in mm/vma.c - introducing
> > > range_contains_unmapped(). Additionally we can simplify the logic, we are
> > > simply checking whether the last vma->vm_end has either a VMA starting
> > > after it or ends before the end parameter.
> > >
> > > No functional change intended.
> > >
> > > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> >
> > I do fear that people will find this function and try and use it
> > internally, it may make our jobs of avoiding this being expanded more
> > annoying.
>
> Hmm, surely we should have some ability to dissuade within mm :)
>
> Thing is I don't love having this function in mm/mseal.c when it has
> nothing to do with mseal()'ing.
>
> If people want to be weird about gaps they can pretty trivially implement
> something like this anyway. Probably. Possibly. Maybe?
Yes, but the existence of a function legitimizes their thought prior to
sending it for review. That is, seeing a function that already does it
makes okay to include the option in the planning.
>
> >
> > Reviewed-by: Liam R. Howlett <Liam.Howlett@...cle.com>
>
> Thanks!
>
Powered by blists - more mailing lists