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: <9f6a864e-f608-4543-874e-09ab034717e9@app.fastmail.com>
Date: Thu, 04 Dec 2025 15:05:55 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Peter Zijlstra" <peterz@...radead.org>, "Ingo Molnar" <mingo@...nel.org>,
 "Oleg Nesterov" <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: seqlock: Cure some more scoped_seqlock() optimization fails

On Thu, Dec 4, 2025, at 11:43, Peter Zijlstra wrote:
> Arnd reported an x86 randconfig using gcc-15 tripped over
> __scoped_seqlock_bug(). Turns out GCC chose not to inline the
> scoped_seqlock helper functions and as such was not able to optimize
> properly.
>
> Reported-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Tested-by: Arnd Bergmann <arnd@...db.de>

> 
> -static inline void __scoped_seqlock_cleanup(struct ss_tmp *sst)
> +static __always_inline void __scoped_seqlock_cleanup(struct ss_tmp *sst)
>  {
>  	if (sst->lock)
>  		spin_unlock(sst->lock);
> @@ -1252,7 +1252,7 @@ static inline void __scoped_seqlock_bug(void) { }
>  extern void __scoped_seqlock_bug(void);
>  #endif
> 
> -static inline void
> +static __always_inline void
>  __scoped_seqlock_next(struct ss_tmp *sst, seqlock_t *lock, enum 
> ss_state target)
>  {
>  	switch (sst->state) {

It looks I got close: I had tried the __always_inline on
__scoped_seqlock_next but missed the one on __scoped_seqlock_cleanup,
so that was not enough.

Your version addresses the issue for me, thanks a lot for the fix!

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ