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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Jul 2015 12:31:35 -0500
From:	Jordan Hargrave <jharg93@...il.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	Jean Delvare <jdelvare@...e.de>, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org,
	Jordan Hargrave <Jordan_Hargrave@...l.com>
Subject: Re: [PATCH] Add support for reading SMBIOS Slot number for PCI devices

On Tue, Jul 21, 2015 at 11:57 AM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> On Mon, Jul 13, 2015 at 09:57:32AM -0500, Jordan Hargrave wrote:
>> On Mon, Jul 13, 2015 at 2:35 AM, Jean Delvare <jdelvare@...e.de> wrote:
>>
>> > Hi Jordan,
>> >
>> > On Fri, 10 Jul 2015 17:02:46 -0500, Jordan Hargrave wrote:
>> > > From: Jordan Hargrave <Jordan_Hargrave@...l.com>
>> > >
>> > > There currently isn't an easy way to determine which PCI devices belong
>> > to
>> > > system slots.  This patch adds support to read SMBIOS Type 9 (System
>> > Slots).
>> >
>> > I'm wondering, can't you use dmidecode or libsmbios to retrieve the
>> > same information?
>> >
>> > --
>> > Jean Delvare
>> > SUSE L3 Support
>> >
>>
>> You can but it's as not easy to determine the slot number for leaf devices
>> on bridges.  Eventually planning on using this for pulling slot number for
>> identifying network cards and disk numbering for systemd
>
> Can you outline the problems with using dmidecode or libsmbios?

Neither dmidecode nor libsmbios report the slot number for devices
behind bridges in a slot.  I'm wanting to use this sysfs variable to
get slot numbers for systemd, so using libsmbios and dmidecode aren't
very useful.  We already report the index for embedded devices in
pci-label.c, this code should have gone in at the same time.

For example.  The SMBIOS entry for slot 3 is 40:00.0 There is a
quad-port NIC in the slot with a bridge at 40:00.0

42:00.0 Bridge (sec=43, sub=45)
43:02.0 Bridge (sec=44, sub=44)
43:04.0 Bridge (sec=45, sub=45)
44:00.0 Ethernet
44:00.1 Ethernet
45:00.0 Ethernet
45:00.1 Ethernet

So dmidecode only returns the slot number for 42:00.0 but not any
child devices.  This code will provide a 'slot' sysfs variable that
reports '3' for all devices under and including the bridge.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ