]> git.ipfire.org Git - thirdparty/linux.git/commit
iommufd/selftest: Remove MOCK_IOMMUPT_AMDV1 format
authorPranjal Shrivastava <praan@google.com>
Mon, 30 Mar 2026 09:26:09 +0000 (09:26 +0000)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 31 Mar 2026 16:13:08 +0000 (13:13 -0300)
commit8c4dc1a5025f5c35beef43fbf8ce50bb7e93b762
tree22f96bf3f8faf1bb6857ba218c85d055365f2fea
parentaaca2aa92785a6ab8e3183e7184bca447a99cd76
iommufd/selftest: Remove MOCK_IOMMUPT_AMDV1 format

syzbot found that allocating a mock domain with AMDV1 format could
cause a WARN_ON because the selftest enabled DYNAMIC_TOP without
providing the required driver_ops.

The AMDV1 format in the selftest was a placeholder and was not actually
used by any of the existing selftests. Instead of adding dummy
driver_ops to satisfy the requirements of a format we don't currently
test, remove the AMDV1 format option from the selftest.

The MOCK_IOMMUPT_DEFAULT and MOCK_IOMMUPT_HUGE formats are unaffected as
they use the amdv1_mock variant which does not enable DYNAMIC_TOP.

Fixes: dcd6a011a8d5 ("iommupt: Add map_pages op")
Link: https://patch.msgid.link/r/20260330092609.2659235-1-praan@google.com
Reported-by: syzbot+453eb7add07c3767adab@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/69c1d50b.a70a0220.3cae05.0001.GAE@google.com/
Signed-off-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iommufd_test.h
drivers/iommu/iommufd/selftest.c