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: <e7afcd75-7e12-4438-8ff0-26b06b209526@intel.com>
Date: Wed, 15 Oct 2025 13:18:28 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 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 10/15/2025 3:33 AM, 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.
> 
> 

Makes sense. It isn't entirely clear if that could cause an actual
problem since the flags the driver uses appear to be set after
validation (ptp_enable and the call to cxgb4_ptprx_timstamping) .. But
having stale data there seems like it could lead to trouble and is worth
cleaning up.


Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ