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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250522135207.GH365796@horms.kernel.org>
Date: Thu, 22 May 2025 14:52:07 +0100
From: Simon Horman <horms@...nel.org>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: andrew+netdev@...n.ch, 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 v2] net: sysfs: Implement is_visible for
 phys_(port_id, port_name, switch_id)

On Wed, May 21, 2025 at 10:08:24PM +0800, Yajun Deng wrote:
> phys_port_id_show, phys_port_name_show and phys_switch_id_show would
> return -EOPNOTSUPP if the netdev didn't implement the corresponding
> method.
> 
> There is no point in creating these files if they are unsupported.
> 
> Put these attributes in netdev_phys_group and implement the is_visible
> method. make phys_(port_id, port_name, switch_id) invisible if the netdev
> dosen't implement the corresponding method.
> 
> Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
> ---
> v2: Remove worthless comments
> v1: https://lore.kernel.org/all/20250515130205.3274-1-yajun.deng@linux.dev/

Reviewed-by: Simon Horman <horms@...nel.org>

FWIIW, I had the same thought that Jakub related in his review of v1.

 "I'm slightly worried some user space depends on the files existing,
  but maybe ENOENT vs EOPNOTSUPP doesn't make a big difference.|

...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ