Re: [PATCH v2 3/3] mm/vma: eliminate mmap_action->error_hook, introduce error_filter

From: Lorenzo Stoakes

Date: Tue Jun 02 2026 - 06:10:02 EST


On Tue, Jun 02, 2026 at 11:16:03AM +0200, David Hildenbrand (Arm) wrote:
>
> >>> /*
> >>> - * If specified, this hook is invoked when an error occurred when
> >>> - * attempting the selected action.
> >>> - *
> >>> - * The hook can return an error code in order to filter the error, but
> >>> - * it is not valid to clear the error here.
> >>> + * If non-zero, filter errors that arise from mmap actions such that we
> >>> + * return error_filter instead. Only valid error codes may be specified.
> >>
> >> Is that really a filter or rather an "error conversion" / "error override".
> >>
> >> "Filter" to my German brain implies that we would ... filter selected error
> >> codes, not convert them to something else?
> >
> > I thik it's what people tend to call this, it's what I've seen it called anyway!
>
> You mean for this monstrosity or for a mechanism that translates one value to
> another one?

In general, but a quick search on lore suggests this might not be as common as I
thought.

>
> > I mean your German brain is being logical :) but by convention going with this
> > terminology.
>
> Sorry, but which convention?

Of calling this error 'filtering'.

I'll send a quick respin and rename this to error_override then!

>
> --
> Cheers,
>
> David

Cheers, Lorenzo