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]
Date:	Sat, 12 Sep 2015 01:11:37 +0000
From:	"Rustad, Mark D" <mark.d.rustad@...el.com>
To:	Alex Williamson <alex.williamson@...hat.com>
CC:	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"alexander.h.duyck@...hat.com" <alexander.h.duyck@...hat.com>,
	"myron.stowe@...hat.com" <myron.stowe@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] vfio/pci: Use kernel VPD access functions

Alex,

> On Sep 11, 2015, at 11:16 AM, Alex Williamson <alex.williamson@...hat.com> wrote:
> 
> RFC - Is this something we should do?

Superficially this looks pretty good. I need to think harder to be sure of the details.

> Should we consider providing
> similar emulation through PCI sysfs to allow lspci to also make use
> of the vpd interfaces?

It looks to me like lspci already uses the vpd attribute in sysfs to access VPD, so maybe nothing more than this is needed. No doubt lspci can be coerced into accessing VPD directly, but is that really worth going after? I'm not so sure.

An strace of lspci accessing a device with VPD shows me:

write(1, "\tCapabilities: [e0] Vital Produc"..., 39	Capabilities: [e0] Vital Product Data
) = 39
open("/sys/bus/pci/devices/0000:02:00.0/vpd", O_RDONLY) = 4
----------------------------------------^^^ accesses to this should be safe, I think

pread(4, "\202", 1, 0)                  = 1
pread(4, "\10\0", 2, 1)                 = 2
pread(4, "PVL Dell", 8, 3)              = 8
write(1, "\t\tProduct Name: PVL Dell\n", 25		Product Name: PVL Dell
) = 25

and so forth.

--
Mark Rustad, Networking Division, Intel Corporation


Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ