linux-stable/drivers/iommu
Linus Torvalds 9413cd7792 Two fixes for the interrupt subsystem:
- Make the handling of the firmware node consistent and do not free the
    node after the domain has been created successfully. The core code
    stores a pointer to it which can lead to a use after free or double
    free.
 
    This used to "work" because the pointer was not stored when the initial
    code was written, but at some point later it was required to store
    it. Of course nobody noticed that the existing users break that way.
 
  - Handle affinity setting on inactive interrupts correctly when
    hierarchical irq domains are enabled. When interrupts are inactive with
    the modern hierarchical irqdomain design, the interrupt chips are not
    necessarily in a state where affinity changes can be handled. The legacy
    irq chip design allowed this because interrupts are immediately fully
    initialized at allocation time. X86 has a hacky workaround for this, but
    other implementations do not. This cased malfunction on GIC-V3. Instead
    of playing whack a mole to find all affected drivers, change the core
    code to store the requested affinity setting and then establish it when
    the interrupt is allocated, which makes the X86 hack go away.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAl8UP+4THHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoSuZD/9tNPR4fIDt4mC9ciSvwSqGTV+q1y1D
 zhXSDro4cJNjzy/9D475IJqOlvchaF9Nfun55b60Q6vnA4VN8G+kABEaG8uwr8mV
 ijTB4f0qKfW/9kUDTJRScq3nNmC3miqg8ZFgFEn6Ecxj3NHmwidATIi5sF6f/XVG
 DdhL0Jys7ycNeGBf7yIKbT5/NOULMHYy9rK1NDAeBo9u3klvmrwrHgdNsiDDhEaU
 KlHtwuQLCdjFY3Lf67YpSah+Hx/gXPI1VHUxDDFRoFmC4RlB0VjyXGydjsisOrSQ
 Cl2gnkQ6VOlLaLbN38nmia9nyb6npzE5iK1h9EDcaRhBACG9O23Bdo+YZYxl6BOP
 mXuyIVKJYczJEp7j1fGHW/aNCoEqC8dGVyN7toxMVfGZmF12JzMSt4SYItPeSjFC
 bPNPRCscpiMOQdgwgO0woK1764V46g1BlmxXtJRdWB4iwWgXcryaz65xzSfNeZF4
 0+TvdYs2FYjxwwIyWj8xJ3Npe1lKhH+06DA6gziwJt1u4it8rl82UcqMFyf/ty1w
 o5LHyMBWYm7SJXSeaZZj+nv7moJKJnmRYKnpry21cUzsK/vQEPX0vqhwh4dSFN3O
 BaBocDsOk+9wkmUwi6haP+6+vpadAFQrsqVhURtwc6OVSWn2/vsf2ZH5P36xwFWD
 tlFanb8hX9y2NQ==
 =elM3
 -----END PGP SIGNATURE-----

Merge tag 'irq-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into master

Pull irq fixes from Thomas Gleixner:
 "Two fixes for the interrupt subsystem:

   - Make the handling of the firmware node consistent and do not free
     the node after the domain has been created successfully. The core
     code stores a pointer to it which can lead to a use after free or
     double free.

     This used to "work" because the pointer was not stored when the
     initial code was written, but at some point later it was required
     to store it. Of course nobody noticed that the existing users break
     that way.

   - Handle affinity setting on inactive interrupts correctly when
     hierarchical irq domains are enabled.

     When interrupts are inactive with the modern hierarchical irqdomain
     design, the interrupt chips are not necessarily in a state where
     affinity changes can be handled. The legacy irq chip design allowed
     this because interrupts are immediately fully initialized at
     allocation time. X86 has a hacky workaround for this, but other
     implementations do not.

     This cased malfunction on GIC-V3. Instead of playing whack a mole
     to find all affected drivers, change the core code to store the
     requested affinity setting and then establish it when the interrupt
     is allocated, which makes the X86 hack go away"

* tag 'irq-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq/affinity: Handle affinity setting on inactive interrupts correctly
  irqdomain/treewide: Keep firmware node unconditionally allocated
2020-07-19 11:53:08 -07:00
..
amd Two fixes for the interrupt subsystem: 2020-07-19 11:53:08 -07:00
intel irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
Kconfig iommu: SUN50I_IOMMU should depend on HAS_DMA 2020-06-30 12:09:06 +02:00
Makefile iommu/vt-d: Move Intel IOMMU driver into subdirectory 2020-06-10 17:46:43 +02:00
arm-smmu-impl.c iommu: arm-smmu-impl: Convert to a generic reset implementation 2020-05-07 14:21:42 +01:00
arm-smmu-qcom.c iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused 2020-07-09 17:20:22 +02:00
arm-smmu-v3.c Merge branches 'arm/msm', 'arm/allwinner', 'arm/smmu', 'x86/vt-d', 'hyper-v', 'core' and 'x86/amd' into next 2020-06-02 10:32:04 +02:00
arm-smmu.c iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back 2020-05-07 14:21:42 +01:00
arm-smmu.h iommu/arm-smmu: Implement iommu_ops->def_domain_type call-back 2020-05-07 14:21:42 +01:00
dma-iommu.c dma-pool: add additional coherent pools to map to gfp mask 2020-04-20 12:09:40 +02:00
exynos-iommu.c iommu/exynos: Convert to probe/release_device() call-backs 2020-05-05 14:36:14 +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 iommu/pamu: Convert to probe/release_device() call-backs 2020-05-05 14:36:13 +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 irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm: Rationalise TCR handling 2020-01-10 15:52:24 +00:00
io-pgtable-arm.c iommu/io-pgtable-arm: Fix IOVA validation for 32-bit 2020-03-02 17:17:26 +01:00
io-pgtable.c iommu/io-pgtable-arm: Rationalise TCR handling 2020-01-10 15:52:24 +00:00
ioasid.c iommu/ioasid: Add custom allocators 2019-10-15 13:34:25 +02:00
iommu-debugfs.c iommu: Fix IOMMU debugfs fallout 2019-02-26 11:15:58 +01:00
iommu-sysfs.c drivers/iommu: Export core IOMMU API symbols to permit modular drivers 2019-12-23 14:06:05 +01:00
iommu-traces.c
iommu.c iommu: Fix use-after-free in iommu_release_device 2020-07-09 17:19:10 +02:00
iova.c iommu/iova: Unify format of the printed messages 2020-05-13 10:54:51 +02:00
ipmmu-vmsa.c iommu/renesas: Fix unused-function warning 2020-05-13 10:46:56 +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 Merge branches 'arm/msm', 'arm/allwinner', 'arm/smmu', 'x86/vt-d', 'hyper-v', 'core' and 'x86/amd' into next 2020-06-02 10:32:04 +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 iommu/mediatek: Convert to probe/release_device() call-backs 2020-05-05 14:36:13 +02:00
mtk_iommu.h iommu/mediatek: Move the tlb_sync into tlb_flush 2019-11-11 15:02:34 +01:00
mtk_iommu_v1.c iommu/mediatek-v1: Fix a build warning for a unused variable 'data' 2020-05-19 14:18:38 +02:00
of_iommu.c iommu/arm-smmu-v3: Parse PASID devicetree property of platform devices 2020-01-15 16:00:57 +00: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 iommu/omap: Add registration for DT fwnode pointer 2020-05-18 15:39:45 +02:00
omap-iommu.h iommu/omap: add support for late attachment of iommu devices 2019-08-09 17:37:10 +02:00
omap-iopgtable.h iommu/omap: Fix -Woverflow warnings when compiling on 64-bit architectures 2020-03-04 16:24:46 +01:00
qcom_iommu.c Linux 5.7-rc4 2020-05-13 12:01:33 +02:00
rockchip-iommu.c iommu/rockchip: Convert to probe/release_device() call-backs 2020-05-05 14:36:13 +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: Convert to probe/release_device() call-backs 2020-05-05 14:36:14 +02:00
tegra-smmu.c iommu/tegra: Convert to probe/release_device() call-backs 2020-05-05 14:36:14 +02:00
virtio-iommu.c Linux 5.7-rc7 2020-05-29 17:10:09 +02:00