Re: [PATCH v3 2/3] mm/vma: remove mmap_action->success_hook

From: Oscar Salvador (SUSE)

Date: Thu Jun 11 2026 - 04:05:03 EST


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 :-)

Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>



--
Oscar Salvador
SUSE Labs