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, 3 Apr 2020 21:51:49 -0700
From:   Fangrui Song <maskray@...gle.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sandeep Patil <sspatil@...gle.com>
Subject: Re: [PATCH] kbuild: mkcompile_h: Include $LD version in /proc/version

On 2020-04-02, Kees Cook wrote:
>On Thu, Apr 02, 2020 at 11:22:02AM -0700, Nick Desaulniers wrote:
>> With Kees patch + Masahiro's diff applied:
>> $ cat /proc/version
>> Linux version 5.6.0-rc7-next-20200330+ (ndesaulniers@<hostname
>> scrubbed>) (clang version 11.0.0 (git@...hub.com:llvm/llvm-project.git
>> 6d71daed03ced011cd25f4e4f4122a368fdc757d), LLD 11.0.0
>> (git@...hub.com:llvm/llvm-project.git
>> 6d71daed03ced011cd25f4e4f4122a368fdc757d)) #167 SMP Thu Apr 2 11:17:36
>> PDT 2020
>>
>> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>> Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>
>
>Awesome! Thanks for testing. :)
>
>> We could actually use this in Android for a VTS test I've, uh, been
>> meaning to write.  Also, LOL at scrubbing the "compatible with" part,
>> reminds me of user agent strings in the browser, which are god awful.
>
>Heh, yeah. That's there because (actually, I think _you_ told me this
>when I asked during the ClangBuiltLinux summit) other tools scanned the
>LD version string for the binutils-specific bits. For this, since it's
>newly added to the kernel /proc/version, nothing is already expecting to
>find an LD string, and it looked super weird in there if I left it
>as-is. Hence, scrub!
>
>-Kees

Thanks for the patch! This is a great idea. The linker version may be
more useful if link-time optimizations or future post link-time
optimizations are enabled. The linker will do code generation just like
the compiler and there will be lots of variety. The LD version can
become more useful in the future.

> +  LD_VERSION=$($LD -v | head -n1 | sed 's/(compatible with [^)]*)//' \

This User-Agent style hack reminds me of https://reviews.llvm.org/D31199
... Looks like nobody had posted patch to teach libtool about LLD yet!
So, I just posted a patch. It should appear on
https://lists.gnu.org/archive/html/libtool-patches/2020-04/index.html in
less than 15 minutes.


As what Nathan has just said

> With this patch + Masahiro's fold in:

Reviewed-by: Fangrui Song <maskray@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ