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: <32ae2c96-51da-304f-9fc0-d531979eff97@zytor.com>
Date:   Mon, 15 Oct 2018 10:30:43 -0700
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Paolo Bonzini <pbonzini@...hat.com>, peng.hao2@....com.cn,
        richard.weiyang@...il.com
Cc:     penghao122@...a.com.cn, rkrcmar@...hat.com, tglx@...utronix.de,
        mingo@...hat.com, joro@...tes.org, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH] kvm/x86 : avoid shifting signed 32-bit value by 31 bits

On 10/15/18 10:23 AM, Paolo Bonzini wrote:
> 
> Even for a value from a 32-bit register?  That would be _BIT, which
> doesn't exist.
> 

Just use _BITUL(). gcc is smart enough to know that that the resulting value
is representable in 32 bits.

Or if you really care, submit a patch to create _BITU(), but I don't
personally see much of a point.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ