android_kernel_xiaomi_sm8350/drivers/pci
Linus Torvalds b5ff7df3df Check mapped ranges on sysfs resource files
This is loosely based on a patch by Jesse Barnes to check the user-space
PCI mappings though the sysfs interfaces.  Quoting Jesse's original
explanation:

  It's fairly common for applications to map PCI resources through sysfs.
  However, with the current implementation, it's possible for an application
  to map far more than the range corresponding to the resourceN file it
  opened.  This patch plugs that hole by checking the range at mmap time,
  similar to what is done on platforms like sparc64 in their lower level
  PCI remapping routines.

  It was initially put together to help debug the e1000e NVRAM corruption
  problem, since we initially thought an X driver might be walking past the
  end of one of its mappings and clobbering the NVRAM.  It now looks like
  that's not the case, but doing the check is still important for obvious
  reasons.

and this version of the patch differs in that it uses a helper function
to clarify the code, and does all the checks in pages (instead of bytes)
in order to avoid overflows when doing "<< PAGE_SHIFT" etc.

Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-02 18:52:51 -07:00
..
hotplug PCI: fix pciehp_free_irq() 2008-09-10 10:50:57 -07:00
pcie PCI: Fix pcie_aspm=force 2008-09-16 09:09:56 -07:00
.gitignore
access.c PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. 2008-07-02 11:25:54 -07:00
bus.c PCI: remove global list of PCI devices 2008-04-20 21:47:02 -07:00
dmar.c PCI/DMAR: don't assume presence of RMRRs 2008-07-22 14:14:18 -07:00
hotplug-pci.c
hotplug.c
htirq.c
intel-iommu.c PCI/iommu: blacklist DMAR on Intel G31/G33 chipsets 2008-09-09 11:42:43 -07:00
intel-iommu.h
iova.c PCI: iova RB tree setup tweak 2008-04-20 21:47:06 -07:00
iova.h PCI: pci-iommu-iotlb-flushing-speedup 2008-04-20 21:47:13 -07:00
Kconfig
Makefile PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
msi.c PCI: fully restore MSI state at resume time 2008-08-07 08:52:37 -07:00
msi.h
pci-acpi.c PCI: disable ASPM per ACPI FADT setting 2008-07-28 14:56:09 -07:00
pci-driver.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
pci-sysfs.c Check mapped ranges on sysfs resource files 2008-10-02 18:52:51 -07:00
pci.c PCI PM: Export pci_pme_active to drivers 2008-08-07 15:33:36 -07:00
pci.h Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
probe.c PCI: re-add debug prints for unmodified BARs 2008-09-12 16:34:46 -07:00
proc.c PCI: fixup sparse endianness warnings in proc.c 2008-07-22 15:19:44 -07:00
quirks.c PCI: Limit VPD length for Broadcom 5708S 2008-08-07 17:47:37 -07:00
remove.c PCI: add PCI Express ASPM support 2008-04-20 21:47:03 -07:00
rom.c
search.c PCI: fix compiler warnings in pci_get_subsys() 2008-09-16 15:52:08 -07:00
setup-bus.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-09-13 14:47:33 -07:00
setup-irq.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
setup-res.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
slot.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
syscall.c