]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
iommu/vt-d: Do not enable ATS for untrusted devices
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 29 Oct 2018 10:47:08 +0000 (13:47 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 5 Dec 2018 09:01:56 +0000 (12:01 +0300)
commitfb58fdcd295b914ece1d829b24df00a17a9624bc
tree0e2800c7216e4ed3f57abecc343bec5ac5dad7bd
parent89a6079df791aeace2044ea93be1b397195824ec
iommu/vt-d: Do not enable ATS for untrusted devices

Currently Linux automatically enables ATS (Address Translation Service)
for any device that supports it (and IOMMU is turned on). ATS is used to
accelerate DMA access as the device can cache translations locally so
there is no need to do full translation on IOMMU side. However, as
pointed out in [1] ATS can be used to bypass IOMMU based security
completely by simply sending PCIe read/write transaction with AT
(Address Translation) field set to "translated".

To mitigate this modify the Intel IOMMU code so that it does not enable
ATS for any device that is marked as being untrusted. In case this turns
out to cause performance issues we may selectively allow ATS based on
user decision but currently use big hammer and disable it completely to
be on the safe side.

[1] https://www.repository.cam.ac.uk/handle/1810/274352

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Ashok Raj <ashok.raj@intel.com>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c