lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Jun 2016 15:11:47 -0500
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Michal Simek <monstr@...str.eu>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Paul Mackerras <paulus@...ba.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Yinghai Lu <yinghai@...nel.org>,
	"David S. Miller" <davem@...emloft.net>
Cc:	sparclinux@...r.kernel.org, linux-mips@...ux-mips.org,
	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org
Subject: [PATCH v1 0/4] PCI: pci_resource_to_user() cleanups

The /sys/devices/pci.../.../resource and /proc/bus/pci/devices files
contain PCI BAR addresses.  On most architectures these addresses are
"resource" values, e.g., CPU physical memory addresses or Linux I/O port
numbers.  These may be offset from the raw PCI values if there are multiple
PCI host bridges.

On others (microblaze, mips, powerpc, sparc) they are raw PCI values as
they would appear on the PCI bus.  pci_resource_to_user() converts from the
struct resource to whatever the arch wants to expose.  It's a no-op on
most arches.

The PCI core provides a pcibios_resource_to_bus() function that converts
from struct resource values to raw PCI bus values.  These patches use that
when possible instead of the arch-specific hand-coded equivalent.

These shouldn't fix or break anything unless I've made a mistake.

---

Bjorn Helgaas (4):
      PCI: Unify pci_resource_to_user() declarations
      microblaze/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus()
      powerpc/pci: Implement pci_resource_to_user() with pcibios_resource_to_bus()
      sparc/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus()


 arch/microblaze/include/asm/pci.h |    3 ---
 arch/microblaze/pci/pci-common.c  |   42 ++++++++++++-------------------------
 arch/mips/include/asm/pci.h       |   10 ---------
 arch/mips/pci/pci.c               |   10 +++++++++
 arch/powerpc/include/asm/pci.h    |    3 ---
 arch/powerpc/kernel/pci-common.c  |   42 ++++++++++++-------------------------
 arch/sparc/include/asm/pci_64.h   |    3 ---
 arch/sparc/kernel/pci.c           |   20 ++++++++++--------
 include/linux/pci.h               |    6 ++++-
 9 files changed, 54 insertions(+), 85 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ