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: <CAK7LNASvYHNqtadDJNm08-PcWAfYoJATMYFWRxhhYOmUv6sm3A@mail.gmail.com>
Date:   Fri, 3 Sep 2021 09:43:18 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 05/13] kbuild: detect objtool update without using .SECONDEXPANSION

On Wed, Sep 1, 2021 at 2:32 AM Kees Cook <keescook@...omium.org> wrote:
>
> On Tue, Aug 31, 2021 at 04:39:56PM +0900, Masahiro Yamada wrote:
> > Redo commit 8852c5524029 ("kbuild: Fix objtool dependency for
> > 'OBJECT_FILES_NON_STANDARD_<obj> := n'") to add the objtool
> > dependency in a cleaner way.
> >
> > Using .SECONDEXPANSION ends up with unreadable code due to escaped
> > dollars. Also, it is not efficient because the second half of
> > Makefile.build is parsed twice every time.
> >
> > Append the objtool dependency to the *.cmd files at the build time.
> >
> > This is what fixdep and gen_ksymdeps.sh already do. So, following the
> > same pattern seems a natural solution.
> >
> > This allows us to drop $$(objtool_deps) entirely.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>
> Okay, so IIUC, this means objtool (and args) now ends up in the .cmd
> file instead of in the Makefile dep rules? That seems reasonable.


Yes.

For example, after 'make defconfig all',
you can see it at the bottom line of *.cmd files.


$ tail -n 5  kernel/.smp.o.cmd
kernel/smp.o: $(deps_kernel/smp.o)

$(deps_kernel/smp.o):

kernel/smp.o: $(wildcard ./tools/objtool/objtool)





> Reviewed-by: Kees Cook <keescook@...omium.org>
>
> --
> Kees Cook



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ