Re: [RFC PATCH 1/4] drivers/iommu: Add page_ext for IOMMU_DEBUG_PAGEALLOC
From: Mostafa Saleh
Date: Wed Oct 29 2025 - 10:21:24 EST
On Mon, Oct 27, 2025 at 12:42:09PM +0100, Jörg Rödel wrote:
> 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>.
My bad, I will fix it in v2.
>
> > --- /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.
I have no solid plans for other features, but I was hoping to build on top
of that in the future, but for now we can make it “iommu-debug-pagealloc.c”
Thanks,
Mostafa
>