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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=UhOezkMdaJNNRr6bKgugBeCr2hf3dXFfGp9mYc3tXhWg@mail.gmail.com>
Date:   Thu, 12 Oct 2017 10:12:47 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Sam Ravnborg <sam@...nborg.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: do not call cc-option before KBUILD_CFLAGS initialization

Hi,

On Thu, Oct 12, 2017 at 2:22 AM, Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
> Some $(call cc-option,...) are invoked very early, even before
> KBUILD_CFLAGS, etc. are initialized.
>
> The returned string from $(call cc-option,...) depends on
> KBUILD_CPPFLAGS, KBUILD_CFLAGS, and GCC_PLUGINS_CFLAGS.
>
> Since they are exported, they are not empty when the top Makefile
> is recursively invoked.
>
> The recursion occurs in several places.  For example, the top
> Makefile invokes itself for silentoldconfig.  "make tinyconfig",
> "make rpm-pkg" are the cases, too.
>
> In those cases, the second call of cc-option from the same line
> runs a different shell command due to non-pristine KBUILD_CFLAGS.
>
> To get the same result all the time, KBUILD_* and GCC_PLUGINS_CFLAGS
> must be initialized before any call of cc-option.  This avoids
> garbage data in the .cache.mk file.
>
> Move all calls of cc-option below the config targets because target
> compiler flags are unnecessary for Kconfig.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
>
>  Makefile | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)

I can't pretend that I know of all the subtleties involved in the
twisty turny passages of the kernel Makefiles, but as far as I can
tell this looks good.  Thanks!

Reviewed-by: Douglas Anderson <dianders@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ