Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-05 Thread Daniel Vetter
On Wed, Nov 04, 2020 at 12:12:15PM -0800, Dan Williams wrote: > On Wed, Nov 4, 2020 at 8:50 AM Bjorn Helgaas wrote: > > > > On Wed, Nov 04, 2020 at 09:44:04AM +0100, Daniel Vetter wrote: > > > On Tue, Nov 3, 2020 at 11:09 PM Dan Williams > > > wrote: > > > > On Tue, Nov 3, 2020 at 1:28 PM Bjorn

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-04 Thread Dan Williams
On Wed, Nov 4, 2020 at 8:50 AM Bjorn Helgaas wrote: > > On Wed, Nov 04, 2020 at 09:44:04AM +0100, Daniel Vetter wrote: > > On Tue, Nov 3, 2020 at 11:09 PM Dan Williams > > wrote: > > > On Tue, Nov 3, 2020 at 1:28 PM Bjorn Helgaas wrote: > > > > On Fri, Oct 30, 2020 at 11:08:11AM +0100, Daniel V

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-04 Thread Bjorn Helgaas
On Wed, Nov 04, 2020 at 09:44:04AM +0100, Daniel Vetter wrote: > On Tue, Nov 3, 2020 at 11:09 PM Dan Williams wrote: > > On Tue, Nov 3, 2020 at 1:28 PM Bjorn Helgaas wrote: > > > On Fri, Oct 30, 2020 at 11:08:11AM +0100, Daniel Vetter wrote: > > > > There's three ways to access PCI BARs from user

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-04 Thread Daniel Vetter
On Tue, Nov 3, 2020 at 11:09 PM Dan Williams wrote: > On Tue, Nov 3, 2020 at 1:28 PM Bjorn Helgaas wrote: > > On Fri, Oct 30, 2020 at 11:08:11AM +0100, Daniel Vetter wrote: > > > There's three ways to access PCI BARs from userspace: /dev/mem, sysfs > > > files, and the old proc interface. Two che

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-03 Thread Dan Williams
On Tue, Nov 3, 2020 at 1:28 PM Bjorn Helgaas wrote: > > On Fri, Oct 30, 2020 at 11:08:11AM +0100, Daniel Vetter wrote: > > There's three ways to access PCI BARs from userspace: /dev/mem, sysfs > > files, and the old proc interface. Two check against > > iomem_is_exclusive, proc never did. And with

Re: [PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-11-03 Thread Bjorn Helgaas
On Fri, Oct 30, 2020 at 11:08:11AM +0100, Daniel Vetter wrote: > There's three ways to access PCI BARs from userspace: /dev/mem, sysfs > files, and the old proc interface. Two check against > iomem_is_exclusive, proc never did. And with CONFIG_IO_STRICT_DEVMEM, > this starts to matter, since we don

[PATCH v5 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-10-30 Thread Daniel Vetter
There's three ways to access PCI BARs from userspace: /dev/mem, sysfs files, and the old proc interface. Two check against iomem_is_exclusive, proc never did. And with CONFIG_IO_STRICT_DEVMEM, this starts to matter, since we don't want random userspace having access to PCI BARs while a driver is lo