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, 17 Oct 2018 00:51:40 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Bernd Edlinger <bernd.edlinger@...mail.de>,
        Borislav Petkov <bp@...e.de>, Sam Ravnborg <sam@...nborg.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] objtool: move libelf check out of top Makefile

On Tue, Oct 16, 2018 at 11:25 PM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>
> On Tue, Oct 16, 2018 at 06:10:52PM +0900, Masahiro Yamada wrote:
> > Another behavioral change is, missing libelf for CONFIG_STACK_VALIDATION
> > was previously a warning, but now a error.
>
> This behavioral change should be fine.  It was already an error for
> UNWINDER_ORC, so this would only upgrade a warning to an error for
> people using STACK_VALIDATION without ORC, which should be a small
> number of people by this point.
>
> > diff --git a/scripts/Makefile.toolcheck b/scripts/Makefile.toolcheck
> > index f3c165d..bc26fc0 100644
> > --- a/scripts/Makefile.toolcheck
> > +++ b/scripts/Makefile.toolcheck
> > @@ -12,6 +12,11 @@ include include/config/auto.conf
> >  __toolcheck:
> >       @:
> >
> > +chk_stack_validation = echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -
> > +msg_stack_validation = "libelf is necessary for building the objtool." \
> > +                    "Please install libelf-dev, libelf-devel or elfutils-libelf-devel."
> > +toolcheck-$(CONFIG_STACK_VALIDATION) += stack_validation
> > +
> >  PHONY += $(toolcheck-y)
> >  __toolcheck: $(toolcheck-y)
>
> This is a nice improvement.
>
> It would probably be a good idea to clarify to the user which config
> option(s) are the cause for the error, by putting
> "CONFIG_STACK_VALIDATION" in the error string, for example.
>
> Though, for this particular case, it would be clearer to have a
> different error, based on which option is enabled, like we had before.
>
> Like:
>
>
> ifdef CONFIG_UNWINDER_ORC
>
> chk_unwinder_orc = echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -
> msg_unwinder_orc = "Cannot build objtool to generate ORC metadata for CONFIG_UNWINDER_ORC=y.  " \
>                        "Please install libelf-dev, libelf-devel or elfutils-libelf-devel."
> toolcheck-$(CONFIG_UNWINDER_ORC) += unwinder_orc
>
> else
>
> chk_stack_validation = echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -
> msg_stack_validation = "Cannot build objtool for CONFIG_STACK_VALIDATION=y.  " \
>                        "Please install libelf-dev, libelf-devel or elfutils-libelf-devel."
> toolcheck-$(CONFIG_STACK_VALIDATION) += stack_validation
>
> endif
>
>
> What do you think?


It is ugly.

Do you need such detailed information like ORC metadata stuff here?

This Makefile aims to error out, showing why the build failed.
That's it.



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ