]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu: Add page_ext for IOMMU_DEBUG_PAGEALLOC
authorMostafa Saleh <smostafa@google.com>
Fri, 9 Jan 2026 17:18:02 +0000 (17:18 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Sat, 10 Jan 2026 09:52:25 +0000 (10:52 +0100)
commit466ae6978a5b8c6022bd4537fbfd00e94bb07219
treea8335e79c310c76ac06d78390e3f3e2d4ed60e3a
parentf5b16b802174fe2b67e2b6a27fa793b749981816
iommu: Add page_ext for IOMMU_DEBUG_PAGEALLOC

Add a new config IOMMU_DEBUG_PAGEALLOC, which registers new data to
page_ext.

This config will be used by the IOMMU API to track pages mapped in
the IOMMU to catch drivers trying to free kernel memory that they
still map in their domains, causing all types of memory corruption.

This behaviour is disabled by default and can be enabled using
kernel cmdline iommu.debug_pagealloc.

Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Documentation/admin-guide/kernel-parameters.txt
drivers/iommu/Kconfig
drivers/iommu/Makefile
drivers/iommu/iommu-debug-pagealloc.c [new file with mode: 0644]
include/linux/iommu-debug-pagealloc.h [new file with mode: 0644]
mm/page_ext.c