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:   Fri, 5 May 2017 13:36:34 -0700
From:   Michael Davidson <md@...gle.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Matthias Kaehlcke <mka@...omium.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Anvin <hpa@...or.com>, grundler@...omium.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Hackmann <ghackmann@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        "linux-tip-commits@...r.kernel.org" 
        <linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/urgent] x86/mm/kaslr: Use the _ASM_MUL macro for
 multiplication to work around Clang incompatibility

On Fri, May 5, 2017 at 12:30 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Fri, May 5, 2017 at 11:44 AM, Matthias Kaehlcke <mka@...omium.org> wrote:
>>
>> Indeed, I expect 4.12 (with this patch ...) to build with Clang for a
>> x86 defconfig (with tons of warnings). ARM64 is very close.
>
> Does it actually *work*, rather than just build?
>

Yes, it does work.

I have been using clang to build and run various 4.x based versions of
Linux on both x86_64 and powerpc for over 6 months now.

Assuming that you have a wrapper for clang that sets a few options and
disables some warnings there really is very little else that is
needed.

powerpc currently only needs a single patch to the arch Makefile to
add a cc-option check to a gcc specific flag.

x86_64 needs the change that was under discussion here, but is still
blocked by issues with building the 16 bit boot code.
Supposedly this has now been fixed in clang, but I have not yet either
seen or tried a version of the compiler with that fix.

arm64 looks like it is also now very close.

There are a few lingering places in the kernel which use variable
length arrays in structs (eg the raid10 driver) which don't build with
clang and that is about it.

So, while I completely understand the resistance to adding arbitrary
hacks to the kernel just to support another compiler it is important
to also understand just how close things are to "just working".

md

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ