On Mon, Oct 12, 2026 at 08:31:59PM +0200, David Hildenbrand (Arm) wrote:
> On 10/9/26 20:04, Lorenzo Stoakes (ARM) wrote:
> > We have now made it such that every driver which sets VMA_IO_BIT marks it
> > as not mm-managed.
>
> Confusing given that mm-managed check tests VMA_IO_BIT.

Yeah, true.

Getting rid of that is a really nice improvement to understanding in general...

>
> Maybe combining this with the next paragraph could make this easier to grasp
>
> "vma_flags_is_mm_managed() still checks for VMA_IO_BIT, and if set, treats it 
> as
> non-mm-managed. This was previously required to handle driver that would set
> VMA_IO_BIT but none of the other flags that would indicate a VMA as 
> non-mm-managed.
>
> We already established now that a driver that sets VMA_IO_BIT must set one of
> the other VMA flags that allow for identifying it as non-mm-managed.
>
> ...
> "

Ack, will update to something like this.

> > --- a/mm/vma.c
> > +++ b/mm/vma.c
> > @@ -2796,7 +2796,7 @@ static int mmap_validate_vma_flags(const vma_flags_t 
> > *flags)
> >             return -EINVAL;
> >  #endif
> >
> > -   if (!vma_flags_test_any(flags, VMA_PFNMAP_BIT, VMA_MIXEDMAP_BIT)) {
> > +   if (vma_flags_is_mm_managed(flags)) {
>
> Ah, there is the change.

Yup! Was an annoying dance to have to do.

>
> Acked-by: David Hildenbrand (Arm) <[email protected]>

Thanks!

--
Cheers, Lorenzo

Reply via email to