]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Don't use lazy flush for untrusted device
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 25 Feb 2021 06:14:54 +0000 (14:14 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 4 Mar 2021 12:22:28 +0000 (13:22 +0100)
commitc62f88c2e25e95965f4d59f02d656faabf1836f6
tree740897d9eecf2e4da4e672e17137bc2df3caf163
parent9d1145197604783b589f8dcbcc911125f513c594
iommu: Don't use lazy flush for untrusted device

The lazy IOTLB flushing setup leaves a time window, in which the device
can still access some system memory, which has already been unmapped by
the device driver. It's not suitable for untrusted devices. A malicious
device might use this to attack the system by obtaining data that it
shouldn't obtain.

Fixes: 7db3956b0cb16 ("iommu/vt-d: Convert intel iommu driver to the iommu ops")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210225061454.2864009-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c