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: <20211004090438.588a8a89@thinkpad>
Date:   Mon, 4 Oct 2021 09:04:38 +0200
From:   Marek BehĂșn <kabel@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Andrew Lunn <andrew@...n.ch>, Pavel Machek <pavel@....cz>,
        "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
        netdev@...r.kernel.org,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: are device names part of sysfs ABI? (was Re: devicename part of
 LEDs under ethernet MAC / PHY)

Hi Greg,

On Mon, 4 Oct 2021 08:37:37 +0200
Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:

> On Sun, Oct 03, 2021 at 10:53:38PM +0200, Marek BehĂșn wrote:
> > Hello Greg,
> > 
> > could you give your opinion on this discussion?  
> 
> What discussion?  Top posting ruins that :(

Sorry, the discussion is here
https://lore.kernel.org/linux-leds/20211001144053.3952474a@thinkpad/T/
But the basic question is below, so you don't need to read the
discussion.

> > Are device names (as returned by dev_name() function) also part of
> > sysfs ABI? Should these names be stable across reboots / kernel
> > upgrades?  
> 
> Stable in what exact way?

Example:
- Board has an ethernet PHYs that is described in DT, and therefore
  has stable sysfs path (derived from DT path), something like
    /sys/devices/.../mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:01

- The PHY has a subnode describing a LED.
  The LED subsystem has a different naming scheme (it uses DT node name
  as a last resort). When everything is okay, the dev_name() of the LED
  will be something like
    ethphy42:green:link

- Now suppose that the PHY driver is unloaded and loaded again. The PHY
  sysfs path is unchanged, but the LED will now be named
    ethphy43:green:link

Is this OK?

> Numbering of devices (where a dynamic value is part of a name, like the
> "42" in "usb42"), is never guaranteed to be stable, but the non-number
> part of the name (like "usb" is in "usb42") is stable, as that is what
> you have properly documented in the Documentation/ABI/ files defining
> the bus and class devices, right?

It does make sense for removable devices like USB. What I am asking
is whether it is also OK for devices that have stable DT nodes.

Marek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ