VOOZH about

URL: https://www.phoronix.com/news/Linux-6.18-PCI-sysfs-serial-num

⇱ Linux 6.18 To Make It Easier Parsing PCI Device Serial Numbers - Phoronix


👁 Phoronix

Linux 6.18 To Make It Easier Parsing PCI Device Serial Numbers

Written by Michael Larabel in Hardware on 20 September 2025 at 08:59 PM EDT. 3 Comments
A patch queued into the PCI subsystem's "next" branch ahead of the Linux 6.18 merge window will uniformally expose the PCI device serial number of devices via sysfs for easy programmatic parsing.

This is similar to the PCI device serial number reporting available with lspci but now can be done via sysfs for those wanting to enumerate PCI device serial numbers that way.

👁 PCI slots


For those concerned about rogue software reading your PCI/PCIe device serial numbers, the serial_number sysfs reporting is limited to admin/root privileges. The patch adding the "serial_number" node to PCI devices with sysfs explains:
"Add a single sysfs read-only interface for reading PCI device serial numbers from userspace in a programmatic way. This device attribute uses the same hexadecimal 1-byte dashed formatting as lspci serial number capability output. If a device doesn't support the serial number capability, the serial_number sysfs attribute will not be visible."

With the patch now in the PCI subsystem's "next" Git branch, it should be submitted for the upcoming Linux 6.18 merge window. As it's a straight-forward addition, this "serial_number" sysfs addition will likely be merged without any real opposition.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.