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: <20260105025139.2348-1-dqfext@gmail.com>
Date: Mon,  5 Jan 2026 10:51:39 +0800
From: Qingfang Deng <dqfext@...il.com>
To: David Yang <mmyangfl@...il.com>
Cc: netdev@...r.kernel.org,
	Andrew Lunn <andrew@...n.ch>,
	Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/2] net: dsa: yt921x: Protect MIB stats with a lock

Hi David,

On Mon, 5 Jan 2026 10:09:01 +0800, David Yang wrote:
> 64bit variables might not be atomic on 32bit architectures, thus cannot
> be made lock-free. Protect them with a spin lock since get_stats64()
> cannot sleep.

Synchronizing both reads and updates with a spin lock is an overkill.
See include/linux/u64_stats_sync.h for a better approach.

-- Qingfang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ