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] [day] [month] [year] [list]
Message-ID: <20260113152705.GX830755@noisy.programming.kicks-ass.net>
Date: Tue, 13 Jan 2026 16:27:05 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: kernel test robot <lkp@...el.com>, Eric Dumazet <edumazet@...gle.com>,
	oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Jakub Kicinski <kuba@...nel.org>,
	Maciej Żenczykowski <maze@...gle.com>,
	Will Deacon <will@...nel.org>,
	"Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: include/net/sock.h:2100:16: sparse: sparse: cast to non-scalar

On Mon, Jan 12, 2026 at 07:30:19PM +0000, Al Viro wrote:

> Sure, but what does that have to do with the final cast in there?  Note
> that generic __READ_ONCE() ends up with __unqual_scalar_typeof(x) for the
> type of result and it seems to be working fine.
> 
> Why would the same type of result be a problem for alpha?  Sure, we need
> a barrier there, so it can't be literal copy of generic __READ_ONCE(),
> but what's the problem with using
> 
> #define __READ_ONCE(x)							\
> ({									\
> 	__unqual_scalar_typeof(x) __x =					\
>  		(*(volatile typeof(__x) *)(&(x)));			\
> 	mb();								\
> 	__x;								\
> })
> 
> there?  What could possibly need those qualifiers added back to the result?
> It is, after all, an r-value, so...

Yeah, I'm not sure about the final cast, that was probably trying to add
'const' back.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ