]> git.baikalelectronics.ru Git - kernel.git/commit
thunderbolt: Export IOMMU based DMA protection support to userspace
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 31 Oct 2018 11:06:52 +0000 (14:06 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 5 Dec 2018 09:01:56 +0000 (12:01 +0300)
commit40e178715e8199c5788e33906667c46e0815c77d
tree760fdc454aa8922d3cc3247411424d2b0f63c2f2
parentd9d81cc94eb76b2d47bd5f4570567abcea590f3c
thunderbolt: Export IOMMU based DMA protection support to userspace

Recent systems with Thunderbolt ports may support IOMMU natively. In
practice this means that Thunderbolt connected devices are placed behind
an IOMMU during the whole time it is connected (including during boot)
making Thunderbolt security levels redundant. This is called Kernel DMA
protection [1] by Microsoft.

Some of these systems still have Thunderbolt security level set to
"user" in order to support OS downgrade (the older version of the OS
might not support IOMMU based DMA protection so connecting a device
still relies on user approval).

Export this information to userspace by introducing a new sysfs
attribute (iommu_dma_protection). Based on it userspace tools can make
more accurate decision whether or not authorize the connected device.

In addition update Thunderbolt documentation regarding IOMMU based DMA
protection.

[1] https://docs.microsoft.com/en-us/windows/security/information-protection/kernel-dma-protection-for-thunderbolt

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <YehezkelShB@gmail.com>
Documentation/ABI/testing/sysfs-bus-thunderbolt
Documentation/admin-guide/thunderbolt.rst
drivers/thunderbolt/domain.c