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: <02b36386-a18c-8bfb-2c70-c398f6fc964b@intel.com>
Date:   Mon, 26 Jun 2023 15:41:27 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Sebastian Sumpf <Sebastian.Sumpf@...ode-labs.com>,
        Borislav Petkov <bp@...en8.de>
Cc:     tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [Bug report] __arch_hweight32/64 x86

On 6/26/23 14:42, Sebastian Sumpf wrote:
> 
>>> Therefore, these registers will not be restored
>>> upon function return by the compiler. This leads to varying
>>> exceptions/bad behavior caused by the thus corrupted registers later
>>> on.
>>
>> How do I reproduce what you're observing so that I can take a look?
> 
> This is hard to tell, I would disable the " X86_FEATURE_POPCNT" feature
> and use the ' CONFIG_ARCH_HAS_FAST_MULTIPLIER' option in order to use
> the multiplier implementation in '__sw_hweight64' in 'lib/hweight.c' At
> least that is what triggered it here.

Looks like you'd also have to be using UML:

$ grep hweight lib/Makefile
obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
$ grep -r GENERIC_HWEIGHT arch/x86
arch/x86/um/Kconfig:config GENERIC_HWEIGHT

I'm not even sure that UML needs GENERIC_HWEIGHT.  From a quick glance,
it looks like x86 used to use GENERIC_HWEIGHT, but got arch-specific
versions later.  UML just never moved over to the arch-specific versions.

I _think_ the attached patch might just fix the problems with the C
version and bring the x86/UML implementation back in line with the rest
of x86.

Thoughts?
View attachment "um-hweight.patch" of type "text/x-patch" (289 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ