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: <CAK7LNAS46hrVh3FNiHHL8_Hqp85VgWnsHyjQ4t-TFH_H344NOg@mail.gmail.com>
Date:   Tue, 21 Jun 2022 17:41:18 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Sedat Dilek <sedat.dilek@...il.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nathan Chancellor <nathan@...nel.org>,
        Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH] kbuild: pass jobserver to cmd_ld_vmlinux.o

On Tue, Jun 21, 2022 at 4:30 PM Jiri Slaby <jslaby@...e.cz> wrote:
>
> On 17. 06. 22, 18:32, Nick Desaulniers wrote:
> > On Fri, Jun 17, 2022 at 3:35 AM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >>
> >> On Fri, Jun 17, 2022 at 12:53 AM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >>>
> >>> On Thu, Jun 16, 2022 at 4:09 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >>>>
> >>>> On Thu, Jun 16, 2022 at 12:45 PM Jiri Slaby <jslaby@...e.cz> wrote:
> >>>>>
> >>>>> Until the link-vmlinux.sh split (cf. the commit below), the linker was
> >>>>> run with jobserver set in MAKEFLAGS. After the split, the command in
> >>>>> Makefile.vmlinux_o is not prefixed by "+" anymore, so this information
> >>>>> is lost.
> >>>>>
> >>>>> Restore it as linkers working in parallel (esp. the LTO ones) make a use
> >>>>> of it.
> >
> > TBH, I agree with Masahiro. I didn't understand this comment "esp. the
> > LTO ones."  Jiri, can you clarify what you mean here?
>
> Sure. clang is not the only compiler/linker that can handle kernel ;).
> So while rebasing gcc-LTO-kernel-patches to 5.19-rc (to upstream them
> later), this broke. See:
> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/lto-wrapper.cc;h=26e06e77be4e0afb2bc3e913062a9c51cab5d205;hb=HEAD#l1336
>
> gcc really parses MAKEFLAGS and looks for "--jobserver-auth=" there, if
> one passes specifies -flto=jobserver.
>
> thanks,
> --
> js
> suse labs



Then, this patch should go together (or after) the GCC LTO upstreaming.




I still do not understand why you are patching the pre-modpost linking, though.

In my understanding, Clang LTO and GCC LTO are implemented
in different layers.

Clang LTO is implemented in the linker (i.e. lld).

In contrast,  GCC LTO is implemented in the compiler (i.e. gcc itself)
The linker (i.e. BFD linker or Gold from GNU binutils project)
is agnostic about LTO.


Your are patching the relocatable link ($(LD) -r),
but I could not find the code parsing jobserver-auth
in the binutils-gdb repository.





-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ