]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu: debug-pagealloc: Check mapped/unmapped kernel memory
authorMostafa Saleh <smostafa@google.com>
Fri, 9 Jan 2026 17:18:05 +0000 (17:18 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Sat, 10 Jan 2026 09:52:27 +0000 (10:52 +0100)
commita8258ffed2efdf533bdc756141eeb7bc5301ad4f
tree27119bcc4d12aabf5b9a53f7e6545f057be72018
parent7e84593795b3c05ca682b8aa74cceeceae636ec7
iommu: debug-pagealloc: Check mapped/unmapped kernel memory

Now, as the page_ext holds count of IOMMU mappings, we can use it to
assert that any page allocated/freed is indeed not in the IOMMU.

The sanitizer doesn’t protect against mapping/unmapping during this
period. However, that’s less harmful as the page is not used by the
kernel.

Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/iommu-debug-pagealloc.c
include/linux/iommu-debug-pagealloc.h
include/linux/mm.h