Re: [RFC PATCH 1/4] drivers/iommu: Add page_ext for IOMMU_DEBUG_PAGEALLOC

From: Jörg Rödel

Date: Mon Oct 27 2025 - 07:46:17 EST


On Fri, Oct 03, 2025 at 05:32:26PM +0000, Mostafa Saleh wrote:
> +config IOMMU_DEBUG_PAGEALLOC
> + bool "Debug page memory allocations against IOMMU"
> + depends on DEBUG_PAGEALLOC && IOMMU_API && PAGE_EXTENSION
> + help
> + This config checks when a page is freed by the kernel
> + it's not mapped in any IOMMU domain. It can help with
> + debugging use-after-free from driver doing DMA.
> + This santaizer can have false-negative cases where some
> + problems won't be detected.
> + Expect overhead when enabling this + enabling the kernel
> + command line iommu.debug_pagealloc.
> +
> + If unsure, say N here.

Expected indentation here is <tab><space><space> and not <tab><tab>.

> --- /dev/null
> +++ b/drivers/iommu/iommu-debug.c

Is there a plan for this file to contain more than page-alloc debugging? If
not, it should get a more specific name, like iommu-debug-pagealloc.c or
similar.