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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Apr 2021 14:53:08 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Very slow clang kernel config ..

I haven't looked into why this is so slow with clang, but it really is
painfully slow:

   time make CC=clang allmodconfig
   real 0m2.667s

vs the gcc case:

    time make CC=gcc allmodconfig
    real 0m0.903s

Yeah, yeah, three seconds may sound like "not a lot of time, but
considering that the subsequent full build (which for me is often
empty) doesn't take all that much longer, that config time clang waste
is actually quite noticeable.

I actually don't do allmodconfig builds with clang, but I do my
default kernel builds with it:

    time make oldconfig
    real 0m2.748s

    time sh -c "make -j128 > ../makes"
    real 0m3.546s

so that "make oldconfig" really is almost as slow as the whole
"confirm build is done" thing. Its' quite noticeable in my workflow.

The gcc config isn't super-fast either, but there's a big 3x
difference, so the clang case really is doing something extra wrong.

I've not actually looked into _why_. Except I do see that "clang" gets
invoked with small (empty?) test files several times, probably to
check for command line flags being valid.

Sending this to relevant parties in the hope that somebody goes "Yeah,
that's silly" and fixes it.

This is on my F34 machine:

     clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34)

in case it matters (but I don't see why it should).

Many many moons ago the promise for clang was faster build speeds.
That didn't turn out to be true, but can we please at least try to
make them not painfully much slower?

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ