linux-stable/arch/powerpc
Gaurav Batra 1f7aacc5eb powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device
For an SR-IOV device, while enabling DDW, a new table is created and
added at index 1 in the group. In the below 2 scenarios, the table is
incorrectly referenced at index 0 (which is where the table is for
default DMA window).

1. When adding DDW

   This issue is exposed with "slub_debug". Error thrown out from
   dma_iommu_dma_supported()

   Warning: IOMMU offset too big for device mask
   mask: 0xffffffff, table offset: 0x800000000000000

2. During Dynamic removal of the PCI device.

   Error is from iommu_tce_table_put() since a NULL table pointer is
   passed in.

Fixes: 381ceda88c ("powerpc/pseries/iommu: Make use of DDW for indirect mapping")
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Gaurav Batra <gbatra@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230505184701.91613-1-gbatra@linux.vnet.ibm.com
2023-05-17 00:54:55 +10:00
..
boot powerpc/boot: Disable power10 features after BOOTAFLAGS assignment 2023-05-12 16:20:18 +10:00
configs powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
crypto powerpc/crypto: Fix aes-gcm-p10 build when VSX=n 2023-05-15 22:48:53 +10:00
include powerpc/iommu: Remove iommu_del_device() 2023-05-17 00:51:06 +10:00
kernel powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device 2023-05-17 00:54:55 +10:00
kexec powerpc/kexec_file: print error string on usable memory property update failure 2023-02-15 23:14:06 +11:00
kvm s390: 2023-05-01 12:06:20 -07:00
lib powerpc/64: vmlinux support building with PCREL addresing 2023-04-20 12:59:21 +10:00
math-emu
mm powerpc/64s/radix: Fix soft dirty tracking 2023-05-11 22:17:38 +10:00
net powerpc/bpf: populate extable entries only during the last pass 2023-05-15 15:40:31 +10:00
perf powerpc/perf: Properly detect mpc7450 family 2023-03-30 23:35:43 +11:00
platforms powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device 2023-05-17 00:54:55 +10:00
purgatory
sysdev powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
tools powerpc: Move script to check relocations at compile time in scripts/ 2023-04-19 07:46:31 -07:00
xmon powerpc/64: vmlinux support building with PCREL addresing 2023-04-20 12:59:21 +10:00
Kbuild
Kconfig dma-mapping updates for Linux 6.4 2023-04-29 10:29:57 -07:00
Kconfig.debug
Makefile powerpc/configs: Make pseries_defconfig an alias for ppc64le_guest 2023-04-21 16:16:25 +10:00
Makefile.postlink