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]
Message-ID: <CA+icZUV3rhvmBv91KMKCgvGSvJUoWDVfaV+08eC-kTMdThRn6w@mail.gmail.com>
Date:   Mon, 6 Apr 2020 12:35:35 +0200
From:   Sedat Dilek <sedat.dilek@...il.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Kees Cook <keescook@...omium.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: mkcompile_h: Include $LD version in /proc/version

On Sun, Apr 5, 2020 at 3:56 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Sun, Apr 5, 2020 at 8:23 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >
> > On Thu, Apr 2, 2020 at 4:24 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
> > >
> > > On Thu, Apr 2, 2020 at 10:18 AM Kees Cook <keescook@...omium.org> wrote:
> > > >
> > > > When doing Clang builds of the kernel, it is possible to link with
> > > > either ld.bfd (binutils) or ld.lld (LLVM), but it is not possible to
> > > > discover this from a running kernel. Add the "$LD -v" output to
> > > > /proc/version.
> > > >
> > > > Signed-off-by: Kees Cook <keescook@...omium.org>
> > >
> >
> > Please feel free and add:
> >
> > Reviewed-by: Sedat Dilek <sedat.dilek@...il.com>
> > Tested-by: Sedat Dilek <sedat.dilek@...il.com>
>
>
> Thanks.
>
> I collected all Reviewed-by and Tested-by.
>

How to test scripts/mkcompile_h?

I did:

$ cd /path/to/linux

$ head -10 scripts/mkcompile_h
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

TARGET=$1
ARCH=$2
SMP=$3
PREEMPT=$4
PREEMPT_RT=$5
CC=$6
LD=$7

$ scripts/mkcompile_h include/generated/compile.h x86_64 SMP "" ""
clang-10 ld.lld-10
  UPD     include/generated/compile.h

$ cat include/generated/compile.h
/* This file is auto generated, version 1 */
/* SMP */
#define UTS_MACHINE "x86_64"
#define UTS_VERSION "#1 SMP Mon Apr 6 12:29:53 CEST 2020"
#define LINUX_COMPILE_BY "dileks"
#define LINUX_COMPILE_HOST "iniza"
#define LINUX_COMPILER "clang version 10.0.0-2, LLD 10.0.0"

This is with clang-10 and ld.lld-10 from Debian/unstable:

$ clang-10 -v
clang version 10.0.0-2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$ ld.lld-10 -v
LLD 10.0.0 (compatible with GNU linkers)

Thanks.

- sed@ -

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ