Re: [PATCH v3 3/3] mm/vma: eliminate mmap_action->error_hook, introduce error_override
From: David Hildenbrand (Arm)
Date: Tue Jun 02 2026 - 08:10:54 EST
On 6/2/26 13:06, Lorenzo Stoakes wrote:
> Rather than providing a hook, simplify things by providing the ability to
> override mmap action errors. This allows us to more carefully validate the
> value provided and thus ensure only a valid error code is specified, and
> simplifies the interface.
>
> This way, we eliminate all hooks but mmap_prepare and allow only mmap
> actions to be specified (which core mm controls).
>
> This significantly improves robustness and eliminates any unnecessary code
> duplication in driver mmap hooks.
>
> We also update the /dev/mem logic (the only user) to use
> mmap_action->error_override instead.
Thanks!
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David