]> 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)
commit6b5442cdf1ca199b816f2d4dc99a0feaf6b1929b
tree740897d9eecf2e4da4e672e17137bc2df3caf163
parent279b9d871c9dec25135e0715e19a87c933c0a4dd
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: 42fc6fbaca8c0 ("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