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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1455058433803.44638@Dell.com>
Date:	Tue, 9 Feb 2016 22:56:30 +0000
From:	<Jordan_Hargrave@...l.com>
To:	<jharg93@...il.com>, <jdelvare@...e.de>,
	<Jordan_Hargrave@...l.com>, <tglx@...utronix.de>,
	<bhelgaas@...gle.com>, <mingo@...hat.com>, <hpa@...or.com>
CC:	<linux-kernel@...r.kernel.org>, <linxu-pci@...r.kernel.org>
Subject: [PATCH] Create pci slot files for SMBIOS Type 9 entries

The following diff builds on the "[PATCHv3] Save SMBIOS Type 9 System Slots"

This will create a /sys/bus/pci/slots/XXX file for each Type 9 entry.  This will be used for systemd enumeration of NICs.

Signed-off-by: Jordan Hargrave <Jordan_Hargrave@...l.com>
---
 arch/x86/pci/common.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index eccd4d9..fc5bc49 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -173,6 +173,23 @@ void pcibios_fixup_bus(struct pci_bus *b)
 
 void pcibios_add_bus(struct pci_bus *bus)
 {
+	const struct dmi_device *dmi;
+	struct dmi_dev_onboard *dslot;
+
+	dmi = NULL;
+	while ((dmi = dmi_find_device(DMI_DEV_TYPE_DEV_SLOT,
+				      NULL, dmi)) != NULL) {
+		dslot = dmi->device_data;
+		if (dslot->segment == pci_domain_nr(bus) &&
+		    dslot->bus == bus->number) {
+			dev_info(&bus->dev, "Found SMBIOS Slot %s\n",
+				 dslot->dev.name);
+			pci_create_slot(bus, dslot->devfn,
+					dslot->dev.name,
+					NULL);
+		}
+	}
+
 	acpi_pci_add_bus(bus);
 }
 
-- 
1.7.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ