linux-sg2042/drivers/iommu/intel
Chris Wilson 29aaebbca4 iommu/vt-d: Handle 36bit addressing for x86-32
Beware that the address size for x86-32 may exceed unsigned long.

[    0.368971] UBSAN: shift-out-of-bounds in drivers/iommu/intel/iommu.c:128:14
[    0.369055] shift exponent 36 is too large for 32-bit type 'long unsigned int'

If we don't handle the wide addresses, the pages are mismapped and the
device read/writes go astray, detected as DMAR faults and leading to
device failure. The behaviour changed (from working to broken) in commit
fa954e6831 ("iommu/vt-d: Delegate the dma domain to upper layer"), but
the error looks older.

Fixes: fa954e6831 ("iommu/vt-d: Delegate the dma domain to upper layer")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: James Sewart <jamessewart@arista.com>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: <stable@vger.kernel.org> # v5.3+
Link: https://lore.kernel.org/r/20200822160209.28512-1-chris@chris-wilson.co.uk
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2020-09-04 12:14:28 +02:00
..
Kconfig IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
Makefile iommu/vt-d: Move Kconfig and Makefile bits down into intel directory 2020-07-29 14:14:55 +02:00
debugfs.c iommu/vt-d: Rename intel-pasid.h to pasid.h 2020-07-24 10:51:21 +02:00
dmar.c iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu 2020-07-24 14:33:39 +02:00
iommu.c iommu/vt-d: Handle 36bit addressing for x86-32 2020-09-04 12:14:28 +02:00
irq_remapping.c iommu/vt-d: Serialize IOMMU GCMD register modifications 2020-09-04 11:39:21 +02:00
pasid.c iommu/vt-d: Rename intel-pasid.h to pasid.h 2020-07-24 10:51:21 +02:00
pasid.h iommu/vt-d: Rename intel-pasid.h to pasid.h 2020-07-24 10:51:21 +02:00
svm.c Merge branch 'akpm' (patches from Andrew) 2020-08-12 11:24:12 -07:00
trace.c