Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-03 Thread Rajat Jain via iommu
On Tue, Jun 2, 2020 at 10:30 PM Mika Westerberg wrote: > > On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > > +static bool risky_device(struct pci_dev *pdev) > > +{ > > + if (pdev->untrusted) { > > + pci_warn(pdev, > > + "Skipping IOMMU quirk for

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Mika Westerberg
On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > +static bool risky_device(struct pci_dev *pdev) > +{ > + if (pdev->untrusted) { > + pci_warn(pdev, > + "Skipping IOMMU quirk for dev (%04X:%04X) on untrusted" > + " PCI link.

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Rajat Jain
On Tue, Jun 2, 2020 at 4:49 PM Prashant Malani wrote: > > Hi Rajat, Hi Prashant, thanks for taking a look. > > On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > > Currently, an external malicious PCI device can masquerade the VID:PID > > of faulty gfx devices, and thus apply iommu

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Prashant Malani via iommu
(Trimming text) On Wed, Jun 03, 2020 at 12:23:48AM +, Rajat Jain wrote: > On Tue, Jun 2, 2020 at 4:49 PM Prashant Malani wrote: > > > > Hi Rajat, > > Hi Prashant, thanks for taking a look. > > > > > On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > > > +static bool

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Prashant Malani via iommu
Hi Rajat, On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > Currently, an external malicious PCI device can masquerade the VID:PID > of faulty gfx devices, and thus apply iommu quirks to effectively > disable the IOMMU restrictions for itself. > > Thus we need to ensure that the

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Raj, Ashok
On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > Currently, an external malicious PCI device can masquerade the VID:PID > of faulty gfx devices, and thus apply iommu quirks to effectively > disable the IOMMU restrictions for itself. > > Thus we need to ensure that the device we are

[PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-02 Thread Rajat Jain via iommu
Currently, an external malicious PCI device can masquerade the VID:PID of faulty gfx devices, and thus apply iommu quirks to effectively disable the IOMMU restrictions for itself. Thus we need to ensure that the device we are applying quirks to, is indeed an internal trusted device.