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] [day] [month] [year] [list]
Message-ID: <fe773700-40c4-486e-b9f6-5e2f2022596e@intel.com>
Date: Mon, 11 Aug 2025 23:37:00 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>, Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <pabeni@...hat.com>, <edumazet@...gle.com>,
	<andrew+netdev@...n.ch>, <netdev@...r.kernel.org>, Jedrzej Jagielski
	<jedrzej.jagielski@...el.com>, <jiri@...nulli.us>, <horms@...nel.org>,
	<David.Kaplan@....com>, <dhowells@...hat.com>, Paul Menzel
	<pmenzel@...gen.mpg.de>, Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH net v2 1/2] devlink: let driver opt out of automatic
 phys_port_name generation

On 8/11/25 23:27, Tony Nguyen wrote:
> 
> 
> On 8/8/2025 11:53 AM, Jakub Kicinski wrote:
>> On Tue,  5 Aug 2025 15:33:41 -0700 Tony Nguyen wrote:
>>> +    if (devlink_port->attrs.no_phys_port_name)
>>> +        return 0;
>>
>> Why are you returning 0 rather than -EOPNOTSUPP?
>> Driver which doesn't implement phys_port_name would normally return
>> -EOPNOTSUPP when user tries to read the sysfs file.
> 
> Jedrek is out so I'm not sure the reason, but it does seem
> -EOPNOTSUPP would be more appropriate so I'll make that change.

when it was a driver callback, returning a 0 was short-circuiting
further (devlink) name computations

but in current form (v2), it is indeed better (at least wrt outcomes)
to return -EOPNOTSUPP, as that aligns with both sysfs and devlink output

so, good to update, thank you!

> 
> Thanks,
> Tony


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ