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: <2eec1d17-a6d1-4859-9cc9-43eeac23edbd@lunn.ch>
Date: Fri, 23 May 2025 15:55:07 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: phy: Add c45_phy_ids sysfs entry

> +What:		/sys/class/mdio_bus/<bus>/<device>/c45_phy_ids
> +Date:		May 2025
> +KernelVersion:	6.16
> +Contact:	netdev@...r.kernel.org
> +Description:
> +		This attribute contains the 32-bit PHY Identifier as reported
> +		by the device during bus enumeration, encoded in hexadecimal.
> +		These C45 IDs are used to match the device with the appropriate
> +		driver.

https://docs.kernel.org/filesystems/sysfs.html#attributes

  Attributes should be ASCII text files, preferably with only one
  value per file. It is noted that it may not be efficient to contain
  only one value per file, so it is socially acceptable to express an
  array of values of the same type.

These are static values, so efficiency is not an issue.

It might be better to have a directory
/sys/class/mdio_bus/<bus>/<device>/c45_phy_ids and then for each MMD
create a file. I would also suggest using is_visible() == 0 for those
with an ID == 0.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ