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: <1639cc31-b57f-4370-8062-6a06252451f0@linux.dev>
Date: Wed, 15 Oct 2025 21:05:16 +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 15:37, Simon Horman wrote:
> On Wed, Oct 15, 2025 at 11:33:02AM +0100, Vadim Fedorenko wrote:
>> 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.
> 
> Thanks Vadim,
> 
> I see that now and it makes sense to me.
> I do think it would be worth mentioning in the patch description.

Fair point, I'll update commit message for v3.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ