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]
Date:   Mon, 4 Mar 2019 14:13:18 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Fenghua Yu <fenghua.yu@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        H Peter Anvin <hpa@...or.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Xiaoyao Li <xiaoyao.li@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        x86 <x86@...nel.org>, kvm@...r.kernel.org
Subject: Re: [PATCH v4 01/17] x86/common: Align cpu_caps_cleared and
 cpu_caps_set to unsigned long

On 04/03/19 13:44, Peter Zijlstra wrote:
> On Mon, Mar 04, 2019 at 11:48:18AM +0100, Paolo Bonzini wrote:
>> True that.  On the other hand btsl/btrl is also one byte smaller if no 
>> operand is %r8-%r15.
> 
> Because then we loose the REX prefix, right. Now _that_ might actually
> be a reason to do that :-)

I knew that would be the right way to put it for you. :)

>> In any case, /me wonders if we should have a macro like
>>
>> #define DECLARE_LE_BITMAP(name,bits) \
>>         u32 name[DIV_ROUND_UP(bits, 32)] __aligned(sizeof(unsigned long))
> 
>  s/u32/__le32/
> 
> To go in bitops/le.h, sure, if there's enough users.

Hmm... actually that should be "BITS_TO_LONGS(bits) * sizeof(unsigned
long) / 4" because bitmap functions may access (or even clear) the last
word as 64 bits.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ