[PATCH v6 25/39] mm/vma: enforce that mm-managed mappings may not set VMA_IO_BIT
David Hildenbrand (Arm)
david at kernel.org
Tue Oct 13 08:26:30 PDT 2026
On 10/13/26 17:05, Lorenzo Stoakes (ARM) wrote:
> It makes no sense for a mapping whose contents the kernel does not own to
> specify that the range is MMIO.
>
> Prior to this patch, all in-tree drivers which did so have been updated
> such that they are marked as not being mm-managed. The check WARNs and
> fails the mmap for any out-of-tree driver that still sets VMA_IO_BIT
> without a kernel mapping.
>
> Here VMA_PFNMAP_BIT, VMA_MIXEDMAP are tested individually rather than using
> vma_flags_is_mm_managed().
>
> This is because vma_flags_is_mm_managed() still checks for VMA_IO_BIT.
>
> The very next commit in this series removes this, and the check is then
> converted to use vma_flags_is_mm_managed().
>
> No functional change intended for in-tree code.
>
> Reviewed-by: Zi Yan <ziy at nvidia.com>
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>
Acked-by: David Hildenbrand (Arm) <david at kernel.org>
--
Cheers,
David
More information about the kvm-riscv
mailing list