Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-22 Thread Christoph Hellwig
On Thu, Nov 22, 2018 at 12:48:40PM +0200, Mika Westerberg wrote: > We had an internal discussion regarding this and it was suggested that > the new flag is called "is_untrusted" instead of "is_external". This > covers Thunderbolt devices currently but can be extend to any other PCIe > device such

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-22 Thread Mika Westerberg
On Fri, Nov 16, 2018 at 11:32:10AM +0200, Mika Westerberg wrote: > On Fri, Nov 16, 2018 at 01:18:04AM -0800, Christoph Hellwig wrote: > > On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > > > FireWire is kind of different but there are connectors such as > > > ExpressCard and NVMe

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-21 Thread Lorenzo Pieralisi
aj; Bjorn Helgaas; Rafael J. Wysocki; Jacob > > > > jun Pan; > > > > Andreas Noever; Michael Jamet; Yehezkel Bernat; Christian Kellner; > > > > Limonciello, > > > > Mario; Anthony Wong; linux-a...@vger.kernel.org; > > > > linux-...@vger.k

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-20 Thread Rafael J. Wysocki
ehezkel Bernat; Christian Kellner; > > > Limonciello, > > > Mario; Anthony Wong; linux-a...@vger.kernel.org; > > > linux-...@vger.kernel.org; linux- > > > ker...@vger.kernel.org > > > Subject: Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices > &

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-16 Thread Lorenzo Pieralisi
ger.kernel.org; > > linux- > > ker...@vger.kernel.org > > Subject: Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices > > > > > > [EXTERNAL EMAIL] > > > > On Thu, Nov 15, 2018 at 05:46:08PM +, Lorenzo Pieralisi wrote: > > > D

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-16 Thread Mika Westerberg
On Fri, Nov 16, 2018 at 01:18:04AM -0800, Christoph Hellwig wrote: > On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > > FireWire is kind of different but there are connectors such as > > ExpressCard and NVMe (over U.2 connector) which carry PCIe and are > > relatively easy to

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-16 Thread Christoph Hellwig
On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > FireWire is kind of different but there are connectors such as > ExpressCard and NVMe (over U.2 connector) which carry PCIe and are > relatively easy to access without need for a screwdriver. AFAIK some > eGPUs are also using some

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 09:00:54PM +0200, Mika Westerberg wrote: > On Thu, Nov 15, 2018 at 05:46:08PM +, Lorenzo Pieralisi wrote: > > Do you really need to parse it if the dev->is_thunderbolt check is enough ? > > Yes, we need to parse it one way or another. dev->is_thunderbolt is > based on

RE: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mario.Limonciello
> Pan; > Andreas Noever; Michael Jamet; Yehezkel Bernat; Christian Kellner; > Limonciello, > Mario; Anthony Wong; linux-a...@vger.kernel.org; linux-...@vger.kernel.org; > linux- > ker...@vger.kernel.org > Subject: Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 08:27:41PM +0100, Lukas Wunner wrote: > On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > > I was thinking we could cover all these with is_external filling them > > based on the _DSD or some other means in the kernel. > > > > We would then deal all such

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Lukas Wunner
On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > I was thinking we could cover all these with is_external filling them > based on the _DSD or some other means in the kernel. > > We would then deal all such devices as "untrusted" by default. Tinfoil hat on, even internal devices

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 07:58:13PM +0200, Yehezkel Bernat wrote: > From what I know, there are more devices that suffer from similar security > issues like Thunderbolt, e.g. FireWire [1]. > My assumption is that the same protection may be applied to such devices too, > even if currently it sounds

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 05:46:08PM +, Lorenzo Pieralisi wrote: > Do you really need to parse it if the dev->is_thunderbolt check is enough ? Yes, we need to parse it one way or another. dev->is_thunderbolt is based on heuristics which do not apply anymore when the thing gets integrated in the

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Yehezkel Bernat
On Thu, Nov 15, 2018 at 7:46 PM Lorenzo Pieralisi wrote: > > On Thu, Nov 15, 2018 at 02:16:27PM +0200, Mika Westerberg wrote: > > On Thu, Nov 15, 2018 at 01:07:36PM +0100, Lukas Wunner wrote: > > > On Thu, Nov 15, 2018 at 01:37:37PM +0200, Mika Westerberg wrote: > > > > On Thu, Nov 15, 2018 at

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Lorenzo Pieralisi
On Thu, Nov 15, 2018 at 02:16:27PM +0200, Mika Westerberg wrote: > On Thu, Nov 15, 2018 at 01:07:36PM +0100, Lukas Wunner wrote: > > On Thu, Nov 15, 2018 at 01:37:37PM +0200, Mika Westerberg wrote: > > > On Thu, Nov 15, 2018 at 11:13:56AM +, Lorenzo Pieralisi wrote: > > > > I have strong

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 01:07:36PM +0100, Lukas Wunner wrote: > On Thu, Nov 15, 2018 at 01:37:37PM +0200, Mika Westerberg wrote: > > On Thu, Nov 15, 2018 at 11:13:56AM +, Lorenzo Pieralisi wrote: > > > I have strong objections to the way these bindings have been forced upon > > > everybody; if

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Lukas Wunner
On Thu, Nov 15, 2018 at 01:37:37PM +0200, Mika Westerberg wrote: > On Thu, Nov 15, 2018 at 11:13:56AM +, Lorenzo Pieralisi wrote: > > I have strong objections to the way these bindings have been forced upon > > everybody; if that's the way *generic* ACPI bindings are specified I > > wonder why

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Thu, Nov 15, 2018 at 11:13:56AM +, Lorenzo Pieralisi wrote: > I have strong objections to the way these bindings have been forced upon > everybody; if that's the way *generic* ACPI bindings are specified I > wonder why there still exists an ACPI specification and related working > group. >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Lorenzo Pieralisi
On Thu, Nov 15, 2018 at 12:22:39PM +0200, Mika Westerberg wrote: > On Tue, Nov 13, 2018 at 11:45:36AM +, Lorenzo Pieralisi wrote: > > On Tue, Nov 13, 2018 at 01:27:00PM +0200, Mika Westerberg wrote: > > > > [...] > > > > > > To be frank the concept (and Microsoft _DSD bindings) seems a bit

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-15 Thread Mika Westerberg
On Tue, Nov 13, 2018 at 11:45:36AM +, Lorenzo Pieralisi wrote: > On Tue, Nov 13, 2018 at 01:27:00PM +0200, Mika Westerberg wrote: > > [...] > > > > To be frank the concept (and Microsoft _DSD bindings) seems a bit vague > > > and not thoroughly defined and I would question its detection at >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-13 Thread Lorenzo Pieralisi
On Tue, Nov 13, 2018 at 01:27:00PM +0200, Mika Westerberg wrote: [...] > > To be frank the concept (and Microsoft _DSD bindings) seems a bit vague > > and not thoroughly defined and I would question its detection at > > PCI/ACPI core level, I would hope this can be clarified at ACPI > >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-13 Thread Mika Westerberg
On Tue, Nov 13, 2018 at 10:56:36AM +, Lorenzo Pieralisi wrote: > On Mon, Nov 12, 2018 at 07:02:03PM +0100, Lukas Wunner wrote: > > On Mon, Nov 12, 2018 at 07:06:25PM +0300, Mika Westerberg wrote: > > > --- a/drivers/pci/probe.c > > > +++ b/drivers/pci/probe.c > > > @@ -1378,6 +1378,27 @@

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-13 Thread Lorenzo Pieralisi
On Mon, Nov 12, 2018 at 07:02:03PM +0100, Lukas Wunner wrote: > On Mon, Nov 12, 2018 at 07:06:25PM +0300, Mika Westerberg wrote: > > --- a/drivers/pci/probe.c > > +++ b/drivers/pci/probe.c > > @@ -1378,6 +1378,27 @@ static void set_pcie_thunderbolt(struct pci_dev *dev) > > } > > } > > > >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-12 Thread Lukas Wunner
On Mon, Nov 12, 2018 at 07:06:25PM +0300, Mika Westerberg wrote: > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -1378,6 +1378,27 @@ static void set_pcie_thunderbolt(struct pci_dev *dev) > } > } > > +static void set_pcie_external(struct pci_dev *dev) > +{ > + struct