Re: [PATCH v3 2/3] mm/vma: remove mmap_action->success_hook
From: Lorenzo Stoakes
Date: Thu Jun 11 2026 - 05:49:42 EST
On Thu, Jun 11, 2026 at 10:00:51AM +0200, Oscar Salvador (SUSE) wrote:
> On Tue, Jun 02, 2026 at 12:06:26PM +0100, Lorenzo Stoakes wrote:
> > This hook was introduced to work around code that seemed to absolutely
> > require access to a VMA pointer upon mmap().
> >
> > However, providing this hook leaves a backdoor to drivers getting access
> > to the very thing mmap_prepare eliminates - a pointer to the VMA.
> >
> > Let's solve this contradiction by removing it. The key intended user was
> > hugetlb, however it seems that the best course now is to avoid allowing
> > all drivers the ability to work around mmap_prepare, and find a different
> > solution there.
> >
> > Signed-off-by: Lorenzo Stoakes <ljs@xxxxxxxxxx>
> > Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>
> Reach out if I can be of any help with the hugetlb thing :-)
Thanks :)
I will probably have a quick go at it at some point and just see what I can
do, hopefully I can figure something out quick, otherwise might very well
take you up on that :))
>
> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
Thanks!
>
>
>
> --
> Oscar Salvador
> SUSE Labs
Cheers, Lorenzo