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:   Wed, 27 Jan 2021 03:02:24 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Elliot Berman <eberman@...eaurora.org>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Trilok Soni <tsoni@...eaurora.org>,
        Mahesh Kumar Kalikot Veetil <mkalikot@...eaurora.org>,
        Jeff Johnson <jjohnson@...eaurora.org>
Subject: Re: [RFC 1/2] Kbuild: Make composite object searching more generic

On Sat, Jan 23, 2021 at 4:27 AM Elliot Berman <eberman@...eaurora.org> wrote:
>
> Reduce repeated logic around expanding composite objects in preparation
> for later commit to support nested composite objects.
>
> Signed-off-by: Elliot Berman <eberman@...eaurora.org>

This patch is a nice clean-up
regardless of your main motivation in 2/2.


I removed the "in preparation ..." part.

Applied to linux-kbuild. Thanks.




> ---
>  scripts/Makefile.lib | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 213677a5..93e4f10 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -56,15 +56,19 @@ else
>  obj-y          := $(filter-out %/, $(obj-y))
>  endif
>
> +# Expand $(foo-objs) $(foo-y) by calling $(call suffix-search,foo.o,-objs -y)
> +suffix-search = $(foreach s,$(2),$($(1:.o=$s)))
>  # If $(foo-objs), $(foo-y), $(foo-m), or $(foo-) exists, foo.o is a composite object
> -multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-))), $(m))))
> -multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) $($(m:.o=-))), $(m))))
> +multi-search = $(sort $(foreach m,$(1), $(if $(strip $(call suffix-search,$(m),$(2) -)), $(m))))
> +multi-used-y := $(call multi-search,$(obj-y),-objs -y)
> +multi-used-m := $(call multi-search,$(obj-m),-objs -y -m)
>  multi-used   := $(multi-used-y) $(multi-used-m)
>
>  # Replace multi-part objects by their individual parts,
>  # including built-in.a from subdirectories
> -real-obj-y := $(foreach m, $(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
> -real-obj-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))
> +real-search = $(foreach m,$(1), $(if $(strip $(call suffix-search,$(m),$(2) -)),$(call suffix-search,$(m),$(2)),$(m)))
> +real-obj-y := $(call real-search, $(obj-y),-objs -y)
> +real-obj-m := $(call real-search, $(obj-m),-objs -y -m)
>
>  always-y += $(always-m)
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>


--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ