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, 7 Aug 2019 09:54:51 +0200
From:   Vasily Gorbik <gor@...ux.ibm.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] s390/build: use size command to perform empty .bss
 check

On Wed, Aug 07, 2019 at 11:33:40AM +0900, Masahiro Yamada wrote:
> On Tue, Aug 6, 2019 at 7:56 PM Vasily Gorbik <gor@...ux.ibm.com> wrote:
> >
> > Currently empty .bss checks performed do not pay attention to "common
> > objects" in object files which end up in .bss section eventually.
> >
> > The "size" tool is a part of binutils and since version 2.18 provides
> > "--common" command line option, which allows to account "common objects"
> > sizes in .bss section size. Utilize "size --common" to perform accurate
> > check that .bss section is unused. Besides that the size tool handles
> > object files without .bss section gracefully and doesn't require
> > additional objdump run.
> >
> > The linux kernel requires binutils 2.20 since 4.13.
> >
> > Kbuild exports OBJSIZE to reference the right size tool.
> >
> > Signed-off-by: Vasily Gorbik <gor@...ux.ibm.com>
> > ---
> >  arch/s390/scripts/Makefile.chkbss | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/arch/s390/scripts/Makefile.chkbss b/arch/s390/scripts/Makefile.chkbss
> > index 884a9caff5fb..ba1d7a8a242f 100644
> > --- a/arch/s390/scripts/Makefile.chkbss
> > +++ b/arch/s390/scripts/Makefile.chkbss
> > @@ -11,8 +11,7 @@ chkbss: $(addprefix $(obj)/, $(chkbss-files))
> >
> >  quiet_cmd_chkbss = CHKBSS  $<
> >        cmd_chkbss = \
> > -       if $(OBJDUMP) -h $< | grep -q "\.bss" && \
> > -          ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \
> > +       if ! $(OBJSIZE) --common $< | awk 'END { if ($$3) exit 1 }'; then \
> 
> While you are touching this line,
> you may also want to replace 'awk' with $(AWK),
> which is defined in the top-level Makefile.

Indeed, thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ