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:   Tue, 6 Sep 2022 22:26:27 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Michal Marek <michal.lkml@...kovi.net>
Subject: Re: [PATCH 1/2] kbuild: use modpost-args-y to clean up modpost arguments

On Tue, Sep 6, 2022 at 12:35 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> Separate the modpost executable (scripts/mod/modpost) and the command
> parameters for the next commit.
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
>
>  Makefile                 |  2 +-
>  scripts/Makefile.modpost | 22 +++++++++++-----------
>  2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index aee4f0769d9d..e07236209606 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1908,7 +1908,7 @@ tags TAGS cscope gtags: FORCE
>  # ---------------------------------------------------------------------------
>
>  PHONY += nsdeps
> -nsdeps: export KBUILD_NSDEPS=1
> +nsdeps: export KBUILD_NSDEPS=y
>  nsdeps: modules
>         $(Q)$(CONFIG_SHELL) $(srctree)/scripts/nsdeps
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index ceb1d78140e7..87821a5fe16b 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -38,17 +38,17 @@ __modpost:
>  include include/config/auto.conf
>  include $(srctree)/scripts/Kbuild.include
>
> -MODPOST = scripts/mod/modpost                                                          \
> -       $(if $(CONFIG_MODVERSIONS),-m)                                                  \
> -       $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a)                                        \
> -       $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)                                  \
> -       $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS))                                     \
> -       $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)       \
> -       -o $@
> +MODPOST = scripts/mod/modpost
> +
> +modpost-args-$(CONFIG_MODVERSIONS)                             += -m
> +modpost-args-$(CONFIG_MODULE_SRCVERSION_ALL)                   += -a
> +modpost-args-$(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)  += -N
> +modpost-args-$(KBUILD_NSDEPS)                                  += -N -d $(MODULES_NSDEPS)

Was it intentional that you included -N for KBUILD_NSDEPS? That seems
like a change in behavior.  Everything else LGTM but that.

> +modpost-args-y += $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)

Ugh, your pattern kind of falls apart for the above ^.  Maybe this is
the most concise way to express this, but boy I sure do sometimes wish
for a programming language that had booleans and simple negation.
Maybe I would regret that in a build system...
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ