linux/drivers/iommu
Robin Murphy 1174ed705d iommu/iova: Don't BUG on invalid PFNs
[ Upstream commit d3e3d2be68 ]

Unlike the other instances which represent a complete loss of
consistency within the rcache mechanism itself, or a fundamental
and obvious misconfiguration by an IOMMU driver, the BUG_ON() in
iova_magazine_free_pfns() can be provoked at more or less any time
in a "spooky action-at-a-distance" manner by any old device driver
passing nonsense to dma_unmap_*() which then propagates through to
queue_iova().

Not only is this well outside the IOVA layer's control, it's also
nowhere near fatal enough to justify panicking anyway - all that
really achieves is to make debugging the offending driver more
difficult. Let's simply WARN and otherwise ignore bogus PFNs.

Reported-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Prakash Gupta <guptap@codeaurora.org>
Link: https://lore.kernel.org/r/acbd2d092b42738a03a21b417ce64e27f8c91c86.1591103298.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:43 +02:00
..
Kconfig iommu/vt-d: Make Intel SVM code 64-bit only 2020-07-22 09:33:18 +02:00
Makefile
amd_iommu.c irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:18:28 +02:00
amd_iommu.h
amd_iommu_debugfs.c
amd_iommu_init.c
amd_iommu_proto.h
amd_iommu_quirks.c
amd_iommu_types.h
amd_iommu_v2.c
arm-smmu-impl.c
arm-smmu-v3.c
arm-smmu.c
arm-smmu.h
dma-iommu.c
dmar.c iommu/vt-d: Enable PCI ACS for platform opt in hint 2020-06-30 15:36:58 -04:00
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:18:28 +02:00
intel-iommu-debugfs.c
intel-iommu.c iommu/vt-d: Don't apply gfx quirks to untrusted devices 2020-07-16 08:16:35 +02:00
intel-pasid.c
intel-pasid.h
intel-svm.c
intel-trace.c
intel_irq_remapping.c irqdomain/treewide: Free firmware node after domain removal 2020-08-19 08:16:27 +02:00
io-pgtable-arm-v7s.c
io-pgtable-arm.c
io-pgtable.c
iommu-debugfs.c
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Fix reference count leak in iommu_group_alloc. 2020-06-03 08:21:28 +02:00
iova.c iommu/iova: Don't BUG on invalid PFNs 2020-09-03 11:26:43 +02:00
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c
mtk_iommu.h
mtk_iommu_v1.c
of_iommu.c
omap-iommu-debug.c iommu/omap: Check for failure of a call to omap_iommu_dump_ctx 2020-08-21 13:05:33 +02:00
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
qcom_iommu.c
rockchip-iommu.c
s390-iommu.c
tegra-gart.c
tegra-smmu.c
virtio-iommu.c