summaryrefslogtreecommitdiff
path: root/drivers/iommu/Kconfig
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2023-10-30 14:34:46 +0300
committerJason Gunthorpe <jgg@nvidia.com>2023-10-30 18:03:20 +0300
commit2e22aac3ea9cfc0ec3209c96644f60c1806a8117 (patch)
tree6eaa4e3592fe393e08d2b2f184e2616f6fc1858e /drivers/iommu/Kconfig
parent361d744ddd61de065fbeb042aaed590d32dd92ec (diff)
downloadlinux-2e22aac3ea9cfc0ec3209c96644f60c1806a8117.tar.xz
iommufd/selftest: Fix page-size check in iommufd_test_dirty()
iommufd_test_dirty()/IOMMU_TEST_OP_DIRTY sets the dirty bits in the mock domain implementation that the userspace side validates against what it obtains via the UAPI. However in introducing iommufd_test_dirty() it forgot to validate page_size being 0 leading to two possible divide-by-zero problems: one at the beginning when calculating @max and while calculating the IOVA in the XArray PFN tracking list. While at it, validate the length to require non-zero value as well, as we can't be allocating a 0-sized bitmap. Link: https://lore.kernel.org/r/20231030113446.7056-1-joao.m.martins@oracle.com Reported-by: syzbot+25dc7383c30ecdc83c38@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-iommu/00000000000005f6aa0608b9220f@google.com/ Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu/Kconfig')
0 files changed, 0 insertions, 0 deletions