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: <20230824144907.GI3523530@kernel.org>
Date: Thu, 24 Aug 2023 16:49:07 +0200
From: Simon Horman <horms@...nel.org>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: Jesse Brandeburg <jesse.brandeburg@...el.com>,
	Tony Nguyen <anthony.l.nguyen@...el.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Alexander Duyck <alexander.duyck@...il.com>,
	Mark Rustad <mark.d.rustad@...el.com>,
	Darin Miller <darin.j.miller@...el.com>,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
	Richard Cochran <richardcochran@...il.com>, netdev@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org
Subject: Re: [PATCH net] ixgbe: fix timestamp configuration code

On Wed, Aug 23, 2023 at 11:15:37PM +0100, Vadim Fedorenko wrote:
> The commit in fixes introduced flags to control the status of hardware
> configuration while processing packets. At the same time another structure
> is used to provide configuration of timestamper to user-space applications.
> The way it was coded makes this structures go out of sync easily. The
> repro is easy for 82599 chips:
> 
> [root@...tname ~]# hwstamp_ctl -i eth0 -r 12 -t 1
> current settings:
> tx_type 0
> rx_filter 0
> new settings:
> tx_type 1
> rx_filter 12
> 
> The eth0 device is properly configured to timestamp any PTPv2 events.
> 
> [root@...tname ~]# hwstamp_ctl -i eth0 -r 1 -t 1
> current settings:
> tx_type 1
> rx_filter 12
> SIOCSHWTSTAMP failed: Numerical result out of range
> The requested time stamping mode is not supported by the hardware.
> 
> The error is properly returned because HW doesn't support all packets
> timestamping. But the adapter->flags is cleared of timestamp flags
> even though no HW configuration was done. From that point no RX timestamps
> are received by user-space application. But configuration shows good
> values:
> 
> [root@...tname ~]# hwstamp_ctl -i eth0
> current settings:
> tx_type 1
> rx_filter 12
> 
> Fix the issue by applying new flags only when the HW was actually
> configured.
> 
> Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices")
> Signed-off-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ