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: <aWKBkGWcXr8V7EIS@google.com>
Date: Sun, 11 Jan 2026 00:42:56 +0800
From: Kuan-Wei Chiu <visitorckw@...il.com>
To: "Maciej W. Rozycki" <macro@...am.me.uk>
Cc: Yury Norov <ynorov@...dia.com>, Petr Tesarik <ptesarik@...e.com>,
	Yury Norov <yury.norov@...il.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Richard Henderson <richard.henderson@...aro.org>,
	Matt Turner <mattst88@...il.com>,
	Magnus Lindholm <linmag7@...il.com>,
	Vineet Gupta <vgupta@...nel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
	Madhavan Srinivasan <maddy@...ux.ibm.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Heiko Carstens <hca@...ux.ibm.com>,
	Vasily Gorbik <gor@...ux.ibm.com>,
	Alexander Gordeev <agordeev@...ux.ibm.com>,
	Chris Zankel <chris@...kel.net>, Max Filippov <jcmvbkbc@...il.com>,
	Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	Robin Murphy <robin.murphy@....com>, Joerg Roedel <joro@...tes.org>,
	Will Deacon <will@...nel.org>, Jakub Kicinski <kuba@...nel.org>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Oliver Neukum <oliver@...kum.org>, Arnd Bergmann <arnd@...db.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marcel Holtmann <marcel@...tmann.org>,
	Johan Hedberg <johan.hedberg@...il.com>,
	Luiz Augusto von Dentz <luiz.dentz@...il.com>,
	Pablo Neira Ayuso <pablo@...filter.org>,
	Florian Westphal <fw@...len.de>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/2] treewide, bits: use ffs_val() where it is
 open-coded

On Sat, Jan 10, 2026 at 10:36:07AM +0000, Maciej W. Rozycki wrote:
> On Fri, 9 Jan 2026, Yury Norov wrote:
> 
> > > diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
> > > index ed06367ece574..2f3809c015b99 100644
> > > --- a/arch/alpha/kernel/smp.c
> > > +++ b/arch/alpha/kernel/smp.c
> > > @@ -525,7 +525,7 @@ handle_ipi(struct pt_regs *regs)
> > >  	  do {
> > >  		unsigned long which;
> > >  
> > > -		which = ops & -ops;
> > > +		which = ffs_val(ops);
> > >  		ops &= ~which;
> > >  		which = __ffs(which);
> > 
> > I guess, this should be:
> > 
> >         which = __ffs(ops);
> >         ops &= ops - 1;
> 
>  I think it's the wrong operation order.
> 
> > > diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c
> > > index 1eb356fdd8323..8934b8b1cf375 100644
> > > --- a/arch/mips/dec/ecc-berr.c
> > > +++ b/arch/mips/dec/ecc-berr.c
> > > @@ -153,7 +153,7 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
> > >  			/* Ack now, now we've rewritten (or not). */
> > >  			dec_ecc_be_ack();
> > >  
> > > -			if (syn && syn == (syn & -syn)) {
> > > +			if (syn && syn == ffs_val(syn)) {
> > 
> > It opencodes is_power_of_2().
> 
>  Correct and it also predates that helper's existence by ~4 years.  I'll 
> be happy to see this converted as the intent will be obviously clearer.
> 
>   Maciej
> 

Hi all,

(Apologies for the off-topic question regarding email delivery)

I noticed Maciej's reply only after seeing David's subsequent response.
For some reason, this specific email from Maciej never reached my gmail
inbox, nor did it appear in my spam folder. It seems gmail may have
silently dropped it.

I have retrieved this raw message from the lore.kernel.org web
interface to reply here.

Since there are other gmail users on this thread (e.g., David, whom I
assume received it successfully given the reply), I am wondering if
anyone else using gmail experienced similar issues with this message?

If anyone has insights on why this might be happening or how to adjust
settings to prevent this, please let me know. I want to ensure I don't
inadvertently miss any comments or appear unresponsive in the future.

Regards,
Kuan-Wei


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ