linux-sg2042/drivers/iommu
Joerg Roedel 754265bcab iommu/amd: Fix race in increase_address_space()
After the conversion to lock-less dma-api call the
increase_address_space() function can be called without any
locking. Multiple CPUs could potentially race for increasing
the address space, leading to invalid domain->mode settings
and invalid page-tables. This has been happening in the wild
under high IO load and memory pressure.

Fix the race by locking this operation. The function is
called infrequently so that this does not introduce
a performance regression in the dma-api path again.

Reported-by: Qian Cai <cai@lca.pw>
Fixes: 256e4621c2 ('iommu/amd: Make use of the generic IOVA allocator')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2019-09-06 10:55:51 +02:00
..
Kconfig iommu: Add virtio-iommu driver 2019-06-06 17:32:13 -04:00
Makefile iommu: Add virtio-iommu driver 2019-06-06 17:32:13 -04:00
amd_iommu.c iommu/amd: Fix race in increase_address_space() 2019-09-06 10:55:51 +02:00
amd_iommu_debugfs.c iommu/amd: Add basic debugfs infrastructure for AMD IOMMU 2018-07-06 14:06:30 +02:00
amd_iommu_init.c iommu/amd: Add support for X2APIC IOMMU interrupts 2019-07-23 17:41:52 +02:00
amd_iommu_proto.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
amd_iommu_types.h iommu/amd: Add support for X2APIC IOMMU interrupts 2019-07-23 17:41:52 +02:00
amd_iommu_v2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
arm-smmu-regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
arm-smmu-v3.c iommu/arm-smmu: Mark expected switch fall-through 2019-08-06 17:26:38 +02:00
arm-smmu.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
dma-iommu.c dma-direct: fix zone selection after an unaddressable CMA allocation 2019-08-21 07:14:10 +09:00
dmar.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 320 2019-06-05 17:37:05 +02:00
exynos-iommu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fsl_pamu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
fsl_pamu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
fsl_pamu_domain.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
fsl_pamu_domain.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
hyperv-iommu.c iommu/hyper-v: Add Hyper-V stub IOMMU driver 2019-02-28 11:12:16 +01:00
intel-iommu-debugfs.c iommu/vt-d: Correctly check format of page table in debugfs 2019-08-09 17:29:25 +02:00
intel-iommu.c Revert "iommu/vt-d: Avoid duplicated pci dma alias consideration" 2019-08-30 16:26:12 +02:00
intel-pasid.c Merge branches 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/omap', 'generic-dma-ops' and 'core' into next 2019-07-04 17:26:48 +02:00
intel-pasid.h iommu/vt-d: Introduce macros useful for dumping DMAR table 2019-05-27 16:16:09 +02:00
intel-svm.c iommu/vt-d: Remove global page flush support 2019-09-03 15:01:27 +02:00
intel_irq_remapping.c iommu/vt-d: Cleanup unused variable 2019-07-01 14:24:01 +02:00
io-pgtable-arm-v7s.c Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu 2019-07-01 13:44:41 +02:00
io-pgtable-arm.c Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu 2019-07-01 13:44:41 +02:00
io-pgtable.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
iommu-debugfs.c iommu: Fix IOMMU debugfs fallout 2019-02-26 11:15:58 +01:00
iommu-sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
iommu-traces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iommu.c Merge branches 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/omap', 'generic-dma-ops' and 'core' into next 2019-07-04 17:26:48 +02:00
iova.c iommu/iova: Remove stale cached32_node 2019-07-22 17:50:49 +02:00
ipmmu-vmsa.c Merge branch 'arm/renesas' into arm/smmu 2019-07-01 14:41:24 +02:00
irq_remapping.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
irq_remapping.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
msm_iommu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 267 2019-06-05 17:30:29 +02:00
msm_iommu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 267 2019-06-05 17:30:29 +02:00
msm_iommu_hw-8xxx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 267 2019-06-05 17:30:29 +02:00
mtk_iommu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
mtk_iommu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
mtk_iommu_v1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
of_iommu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
omap-iommu-debug.c Merge branches 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/omap', 'generic-dma-ops' and 'core' into next 2019-07-04 17:26:48 +02:00
omap-iommu.c Merge branches 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/omap', 'generic-dma-ops' and 'core' into next 2019-07-04 17:26:48 +02:00
omap-iommu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
omap-iopgtable.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
qcom_iommu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
rockchip-iommu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
s390-iommu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tegra-gart.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
tegra-smmu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
virtio-iommu.c iommu/virtio: Update to most recent specification 2019-07-22 11:52:27 -04:00