mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
Mike Travis and Mike Habeck reported an issue where iova allocation would return a range that was larger than a device's dma mask. https://lkml.org/lkml/2011/3/29/423 The dmar initialization code will reserve all PCI MMIO regions and copy those reservations into a domain specific iova tree. It is possible for one of those regions to be above the dma mask of a device. It is typical to allocate iovas with a 32bit mask (despite device's dma mask possibly being larger) and cache the result until it exhausts the lower 32bit address space. Freeing the iova range that is >= the last iova in the lower 32bit range when there is still an iova above the 32bit range will corrupt the cached iova by pointing it to a region that is above 32bit. If that region is also larger than the device's dma mask, a subsequent allocation will return an unusable iova and cause dma failure. Simply don't cache an iova that is above the 32bit caching boundary. Reported-by: Mike Travis <travis@sgi.com> Reported-by: Mike Habeck <habeck@sgi.com> Cc: stable@kernel.org Acked-by: Mike Travis <travis@sgi.com> Tested-by: Mike Habeck <habeck@sgi.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> |
||
|---|---|---|
| .. | ||
| hotplug | ||
| pcie | ||
| .gitignore | ||
| access.c | ||
| bus.c | ||
| dmar.c | ||
| hotplug-pci.c | ||
| hotplug.c | ||
| htirq.c | ||
| intel-iommu.c | ||
| intr_remapping.c | ||
| intr_remapping.h | ||
| ioapic.c | ||
| iov.c | ||
| iova.c | ||
| irq.c | ||
| Kconfig | ||
| Makefile | ||
| msi.c | ||
| msi.h | ||
| pci-acpi.c | ||
| pci-driver.c | ||
| pci-label.c | ||
| pci-stub.c | ||
| pci-sysfs.c | ||
| pci.c | ||
| pci.h | ||
| probe.c | ||
| proc.c | ||
| quirks.c | ||
| remove.c | ||
| rom.c | ||
| search.c | ||
| setup-bus.c | ||
| setup-irq.c | ||
| setup-res.c | ||
| slot.c | ||
| syscall.c | ||
| vpd.c | ||
| xen-pcifront.c | ||