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]
Date:   Sat, 29 Apr 2017 14:23:22 -0700
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Greg Hackmann <ghackmann@...gle.com>,
        Kees Cook <keescook@...omium.org>
Cc:     Matthias Kaehlcke <mka@...omium.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "x86@...nel.org" <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Grant Grundler <grundler@...omium.org>,
        Michael Davidson <md@...gle.com>
Subject: Re: [PATCH v2] x86/mm/kaslr: Use _ASM_MUL macro for multiplication

On 04/26/17 14:29, Greg Hackmann wrote:
> On 04/26/2017 02:24 PM, hpa@...or.com wrote:
>>>> This really feels like a "fix your compiler" issue.
>>>
>>> We already use the other forms, what's so bad about adding mul too?
>>> And if this lets us build under clang, all the better.
>>>
>>> -Kees
>>
>> It's not bad per se, but if this doesn't eventually gets fixed in
>> clang we'll have no end of this crap.
>>
> 
> AIUI the "problem" is that clang is spilling mix_const into memory
> rather than assigning it to a register.  This is perfectly legal since
> mix_const has a constraint of "rm".  But mul needs a suffix when the
> input is a memory location, since it can't infer the multiplication
> width from the input operand anymore.
> 
> You get the same error message with gcc if you force it to use a memory
> location, by narrowing the constraint from "rm" to "m".

OK, that's a genuine bug.  Please explain that in the comment; it has
nothing to do with clang.

	-hpa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ