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] [day] [month] [year] [list]
Message-ID: <20190408130235.hmpmr6dtc2prywzu@treble>
Date:   Mon, 8 Apr 2019 08:02:35 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     'Luis Ressel' <aranea@...ah.de>,
        Peter Zijlstra <peterz@...radead.org>,
        open list <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] objtool: Don't use -Werror

On Mon, Apr 08, 2019 at 09:20:50AM +0000, David Laight wrote:
> From: Josh Poimboeuf
> > Sent: 05 April 2019 18:23
> > On Fri, Apr 05, 2019 at 05:17:15PM +0000, David Laight wrote:
> > > > Hm, I don't see that in cmd_objtool, or any commits from you in
> > > > scripts/Makefile.build.
> > >
> > > Not sure I remember actually committing them.
> > > Maybe 'git diff' isn't doing what I expect :-)
> > > I hate git.
> > 
> > Do you see it here?
> > 
> >   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/Makefile.build
> 
> No, I must have had to tell git to apply the change locally.
> I can't see how to get git to diff against the 'real' head.
> Anyway a 'random' number of ^ after HEAD gave me:
> 
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index e7889f4..a2f7abe 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -193,7 +193,9 @@ else
>  cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $<
> 
>  cmd_modversions_c =                                                            \
> -       if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then             \
> +       if ! obj_headers=$$($(OBJDUMP) -h $(@D)/.tmp_$(@F)); then               \
> +               false;                                                          \
> +       elif echo "$$obj_headers" | grep -q __ksymtab; then                     \
>                 $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes))  \
>                     > $(@D)/.tmp_$(@F:.o=.ver);                                 \
>                                                                                 \
> @@ -277,7 +279,14 @@ endif
>  # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file
>  cmd_objtool = $(if $(patsubst y%,, \
>         $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \
> -       $(__objtool_obj) $(objtool_args) "$(objtool_o)";)
> +       $(__objtool_obj) $(objtool_args) "$(objtool_o)" && { \
> +               $(OBJDUMP) -h "$(objtool_o)" >/dev/null 2>&1 || { \
> +                       echo >&2 "******* objtool generated the invalid file $(objtool_o)"; \
> +                       echo >&2 "******* Update libelf.so or disable the ORC unwinder"; \
> +                       /bin/false; \
> +               }; \
> +       };)
> +
>  objtool_obj = $(if $(patsubst y%,, \
>         $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \
>         $(__objtool_obj))
> 
> Do you want a formal patch?

Hm, I wonder if there's a way for objtool itself to detect it's
producing a bad file.  That would be a bit cleaner.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ