Skip to contentSkip to conversation

Patch "s390/pci: expose UID uniqueness guarantee" has been added to the 5.12-stable tree

DISCUSSION Niklas Schnelle 2 participants 2 messages May 10, 2021 1 message not in the archive Stable branch

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 40 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

s390/pci: expose UID uniqueness guarantee

to the 5.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
s390-pci-expose-uid-uniqueness-guarantee.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit 7b9825aa0891087c5c91be0fb75431919e2027e3

Author: Niklas Schnelle <[email protected]>
Date:   Wed Feb 24 11:29:36 2021 +0100

s390/pci: expose UID uniqueness guarantee

[ Upstream commit 408f2c9c15682fc21b645fdec1f726492e235c4b ]

On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices/<dev>/uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be unique within the Linux instance, this is guaranteed by the platform if and only if the UID Uniqueness Checking flag is set within the CLP List PCI Functions response.

While the UID has been exposed to userspace since commit ac4995b9d570 ("s390/pci: add some new arch specific pci attributes") whether or not the platform guarantees its uniqueness for the lifetime of the Linux instance while defined is not visible from userspace. Remedy this by exposing this as a per device attribute at

/sys/bus/pci/devices/<dev>/uid_is_unique

Quoted 10 lines

Keeping this a per device attribute allows for maximum flexibility if we ever end up with some devices not having a UID or not enjoying the guaranteed uniqueness.

Hi Sasha,

I think we should not backport this patch to the stable kernels either 5.12, 5.11 nor 5.10.

The reason is that I'd like this staty together with commit 81bbf03905aa ("s390/pci: expose a PCI device's UID as its index") since this then allows to reason that if uid_is_unique is 1 that implies that the index attribute must exist. On the other hand backporting the other patch too would create new network interface names. I reckon that there would be some value for the uid_is_unique attribute alone but I think it's not worth having more possible scenarios.

Thanks,
Niklas Schnelle

#2 lore raw
Quoted 57 lines · Niklas Schnelle
Quoted 40 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

s390/pci: expose UID uniqueness guarantee

to the 5.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
s390-pci-expose-uid-uniqueness-guarantee.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit 7b9825aa0891087c5c91be0fb75431919e2027e3

Author: Niklas Schnelle <[email protected]>
Date:   Wed Feb 24 11:29:36 2021 +0100

s390/pci: expose UID uniqueness guarantee

[ Upstream commit 408f2c9c15682fc21b645fdec1f726492e235c4b ]

On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices/<dev>/uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be unique within the Linux instance, this is guaranteed by the platform if and only if the UID Uniqueness Checking flag is set within the CLP List PCI Functions response.

While the UID has been exposed to userspace since commit ac4995b9d570 ("s390/pci: add some new arch specific pci attributes") whether or not the platform guarantees its uniqueness for the lifetime of the Linux instance while defined is not visible from userspace. Remedy this by exposing this as a per device attribute at

/sys/bus/pci/devices/<dev>/uid_is_unique

Quoted 10 lines

Keeping this a per device attribute allows for maximum flexibility if we ever end up with some devices not having a UID or not enjoying the guaranteed uniqueness.

Hi Sasha,

I think we should not backport this patch to the stable kernels either 5.12, 5.11 nor 5.10.

Quoted 7 lines

The reason is that I'd like this staty together with commit 81bbf03905aa ("s390/pci: expose a PCI device's UID as its index") since this then allows to reason that if uid_is_unique is 1 that implies that the index attribute must exist. On the other hand backporting the other patch too would create new network interface names. I reckon that there would be some value for the uid_is_unique attribute alone but I think it's not worth having more possible scenarios.

Good point, now dropped from everywhere, thanks.

greg k-h