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: <20251124125249.GDaSRVIapy2dmis28p@fat_crate.local>
Date: Mon, 24 Nov 2025 13:52:49 +0100
From: Borislav Petkov <bp@...en8.de>
To: Kuan-Wei Chiu <visitorckw@...il.com>
Cc: Nikolay Borisov <nik.borisov@...e.com>, linux-edac@...r.kernel.org,
	linux-kernel@...r.kernel.org, Yazen.Ghannam@....com
Subject: Re: [PATCH v2] RAS/AMD/ATL: Remove bitwise_xor_bits

On Mon, Nov 24, 2025 at 08:03:02PM +0800, Kuan-Wei Chiu wrote:
> On Mon, Nov 24, 2025 at 12:05:26PM +0100, Borislav Petkov wrote:
> > On Mon, Nov 24, 2025 at 04:57:51PM +0800, Kuan-Wei Chiu wrote:
> > > > Both LLVM/GCC support a __builtin_parity function which is functionally
> > > > equivalent to the custom bitwise_xor_bits() one. Let's simplify the code by
> > > > relying on the built-in. No functional changes.
> > > 
> > > IIRC in some cases,
> > 
> > Which are those cases?
> > 
> > Do you have a trigger scenario?
> > 
> I did a quick search, and I believe it was this kernel test robot
> report [1] that reminded me of this compiler behavior.
> 
> [1]: https://lore.kernel.org/oe-kbuild-all/202501312159.l6jNRaYy-lkp@intel.com/

Interesting, thanks for the pointer.

@Nik, just use hweight16() but pls do check what asm the compiler generates
before and after so that at least there's some palpable improvement or gcc is
smart enough to replace the unrolled XORing with something slick.

Also put in the commit message why we're not using the builtin parity thing
and quote the link above.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ