Message ID | 20220218005521.172832-1-baolu.lu@linux.intel.com (mailing list archive) |
---|---|
Headers | show |
Series | Fix BUG_ON in vfio_iommu_group_notifier() | expand |
On Fri, Feb 18, 2022 at 08:55:10AM +0800, Lu Baolu wrote: > Hi folks, > > The iommu group is the minimal isolation boundary for DMA. Devices in > a group can access each other's MMIO registers via peer to peer DMA > and also need share the same I/O address space. > > Once the I/O address space is assigned to user control it is no longer > available to the dma_map* API, which effectively makes the DMA API > non-working. > > Second, userspace can use DMA initiated by a device that it controls > to access the MMIO spaces of other devices in the group. This allows > userspace to indirectly attack any kernel owned device and it's driver. This series has changed quite a lot since v1 - but I couldn't spot anything wrong with this. It is a small incremental step and I think it is fine now, so Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> I hope you continue to work on the "Scrap iommu_attach/detach_group() interfaces" series and try to minimize all the special places testing against the default domain Thanks, Jason
On 2/18/22 11:51 PM, Jason Gunthorpe wrote: > On Fri, Feb 18, 2022 at 08:55:10AM +0800, Lu Baolu wrote: >> Hi folks, >> >> The iommu group is the minimal isolation boundary for DMA. Devices in >> a group can access each other's MMIO registers via peer to peer DMA >> and also need share the same I/O address space. >> >> Once the I/O address space is assigned to user control it is no longer >> available to the dma_map* API, which effectively makes the DMA API >> non-working. >> >> Second, userspace can use DMA initiated by a device that it controls >> to access the MMIO spaces of other devices in the group. This allows >> userspace to indirectly attack any kernel owned device and it's driver. > This series has changed quite a lot since v1 - but I couldn't spot > anything wrong with this. It is a small incremental step and I think > it is fine now, so > > Reviewed-by: Jason Gunthorpe<jgg@nvidia.com> > > I hope you continue to work on the "Scrap iommu_attach/detach_group() > interfaces" series and try to minimize all the special places testing > against the default domain Sure. Best regards, baolu
On 2/18/22 8:55 AM, Lu Baolu wrote: > v6: > - Refine comments and commit mesages. > - Rename iommu_group_set_dma_owner() to iommu_group_claim_dma_owner(). > - Rename iommu_device_use/unuse_kernel_dma() to > iommu_device_use/unuse_default_domain(). > - Remove unnecessary EXPORT_SYMBOL_GPL. > - Change flag name from no_kernel_api_dma to driver_managed_dma. > - Merge 4 "Add driver dma ownership management" patches into single > one. Thanks you very much for review and comments. A new version (v7) has been posted. https://lore.kernel.org/linux-iommu/20220228005056.599595-1-baolu.lu@linux.intel.com/ If I missed anything there, please let me know. Best regards, baolu