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: <193627cf-a8c7-4428-a5d3-8813b1edc04d@linux.dev>
Date: Wed, 15 Oct 2025 11:33:02 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Simon Horman <horms@...nel.org>
Cc: Shyam Sundar S K <Shyam-sundar.S-k@....com>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Egor Pomozov <epomozov@...vell.com>, Potnuri Bharat Teja
 <bharat@...lsio.com>, Dimitris Michailidis <dmichail@...gible.com>,
 MD Danish Anwar <danishanwar@...com>, Roger Quadros <rogerq@...nel.org>,
 Richard Cochran <richardcochran@...il.com>,
 Russell King <linux@...linux.org.uk>,
 Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 5/7] cxgb4: convert to ndo_hwtstamp API

On 15/10/2025 11:05, Simon Horman wrote:
> On Tue, Oct 14, 2025 at 10:42:14PM +0000, Vadim Fedorenko wrote:
>> Convert to use .ndo_hwtstamp_get()/.ndo_hwtstamp_set() callbacks.
>>
>> Though I'm not quite sure it worked properly before the conversion.
>>
>> Signed-off-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
> 
> Hi Vadim,
> 
> There is quite a lot of change here. Probably it's not worth "fixing"
> the current code before migrating it. But I think it would be worth
> expanding a bit on the statement about not being sure it worked?

Hi Simon!

Well, let me try to explain the statement about not being sure it
worked. The original code was copying new configuration into netdev's
private structure before validating that the values are acceptable by
the hardware. In case of error, the driver was not restoring original
values, and after the call:

ioctl(SIOCSHWTSTAMP, <unsupported_config>) = -ERANGE

the driver would have configuration which could not be reapplied and not 
synced to the actual hardware config:

ioctl(SIOCGHWTSTAMP) = <unsupported_config>

The logic change in the patch is to just keep original configuration in
case of -ERANGE error. Otherwise the logic is not changed.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ