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, 6 Apr 2022 14:28:45 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Nicolas Schier <nicolas@...sle.eu>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v2 07/10] kbuild: get rid of duplication in the first line
 of *.mod files

On Wed, Apr 6, 2022 at 5:16 AM Nicolas Schier <nicolas@...sle.eu> wrote:
>
> On Tue, Apr 05, 2022 at 08:33:55PM +0900 Masahiro Yamada wrote:
> > The first line of *.mod lists the member objects of the module.
> > This list may contain duplication if the same object is added multiple
> > times, like this:
> >
> >   obj-m := foo.o
> >   foo-$(CONFIG_FOO1_X) += foo1.o
> >   foo-$(CONFIG_FOO1_Y) += foo1.o
> >   foo-$(CONFIG_FOO2_X) += foo2.o
> >   foo-$(CONFIG_FOO2_Y) += foo2.o
> >
> > This is probably not a big deal. As far as I know, the only small
> > problem is scripts/mod/sumversion.c parses the same file over again.
> > This can be avoided by adding $(sort ...). It has a side-effect that
> > sorts the objects alphabetically, but it is not a big deal, either.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > ---
> >
> > Changes in v2:
> >   - new
> >
> >  scripts/Makefile.build | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index 3ef2373f0a57..63625877aeae 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -307,8 +307,10 @@ $(obj)/%.prelink.o: $(obj)/%.o FORCE
> >       $(call if_changed,cc_prelink_modules)
> >  endif
> >
> > +multi-m-prereqs = $(sort $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)))
> > +
> >  cmd_mod = { \
> > -     echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \
> > +     echo $(if $(multi-m-prereqs), $(multi-m-prereqs), $(@:.mod=.o)); \
>
> I'd rather expected to see $(or) here, too, as in commit 5c8166419acf ("kbuild:
> replace $(if A,A,B) with $(or A,B)").

Ah, good catch.

I fixed it up locally.

Thanks for the review.


>
> Reviewed-by: Nicolas Schier <nicolas@...sle.eu>
>
> >       $(undefined_syms) echo; \
> >       } > $@
> >
> > --
> > 2.32.0
> >
> >
>
> --
> epost|xmpp: nicolas@...sle.eu          irc://oftc.net/nsc
> ↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
>      -- frykten for herren er opphav til kunnskap --



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ