linux-stable/drivers/iommu
Zhou Wang a76a37777f iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer
Reading the 'prod' MMIO register in order to determine whether or not
there is valid data beyond 'cons' for a given queue does not provide
sufficient dependency ordering, as the resulting access is address
dependent only on 'cons' and can therefore be speculated ahead of time,
potentially allowing stale data to be read by the CPU.

Use readl() instead of readl_relaxed() when updating the shadow copy of
the 'prod' pointer, so that all speculated memory reads from the
corresponding queue can occur only from valid slots.

Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Link: https://lore.kernel.org/r/1601281922-117296-1-git-send-email-wangzhou1@hisilicon.com
[will: Use readl() instead of explicit barrier. Update 'cons' side to match.]
Signed-off-by: Will Deacon <will@kernel.org>
2020-09-28 22:57:43 +01:00
..
amd treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arm iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer 2020-09-28 22:57:43 +01:00
intel treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dma-iommu.c dma-pool: fix coherent pool allocations for IOMMU mappings 2020-08-14 16:27:00 +02:00
exynos-iommu.c Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
fsl_pamu.c iommu/pamu: Use kzfree() in fsl_pamu_probe() 2020-06-30 10:47:38 +02:00
fsl_pamu.h
fsl_pamu_domain.c iommu/pamu: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
fsl_pamu_domain.h
hyperv-iommu.c irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
io-pgtable-arm-v7s.c iommu: Add gfp parameter to io_pgtable_ops->map() 2020-07-24 14:29:47 +02:00
io-pgtable-arm.c Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sysfs.c
iommu-traces.c
iommu.c Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
iova.c iommu/iova: Don't BUG on invalid PFNs 2020-06-30 10:42:27 +02:00
ipmmu-vmsa.c IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
irq_remapping.c
irq_remapping.h
Kconfig IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
Makefile More Arm SMMU updates for 5.9 2020-07-29 14:47:37 +02:00
msm_iommu.c iommu: Add gfp parameter to io_pgtable_ops->map() 2020-07-24 14:29:47 +02:00
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
mtk_iommu.h Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
mtk_iommu_v1.c iommu/mediatek: Do no use dev->archdata.iommu 2020-06-30 11:59:48 +02:00
of_iommu.c of/device: Add input id to of_dma_configure() 2020-07-28 15:51:32 +01:00
omap-iommu-debug.c iommu/omap: Check for failure of a call to omap_iommu_dump_ctx 2020-07-22 15:02:33 +02:00
omap-iommu.c Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
omap-iommu.h
omap-iopgtable.h iommu/omap: Fix -Woverflow warnings when compiling on 64-bit architectures 2020-03-04 16:24:46 +01:00
rockchip-iommu.c iommu/rockchip: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
s390-iommu.c s390 updates for the 5.8 merge window 2020-06-08 12:05:31 -07:00
sun50i-iommu.c iommu/sun50i: Remove unused variable 2020-06-30 12:05:09 +02:00
tegra-gart.c iommu/tegra: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
tegra-smmu.c iommu/tegra: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
virtio-iommu.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00