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:   Tue, 16 Oct 2018 21:54:20 +0200
From:   Borislav Petkov <bp@...e.de>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     linux-kbuild@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Bernd Edlinger <bernd.edlinger@...mail.de>,
        Sam Ravnborg <sam@...nborg.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] kbuild: check the presence of lzo and lz4 tools when
 necessary

On Tue, Oct 16, 2018 at 06:10:53PM +0900, Masahiro Yamada wrote:
> If CONFIG_KERNEL_LZ4 is enabled without lz4 tool installed on the
> system, the build fails at the very last stage (reported by
> Borislav Petkov [1]).
> 
>   LZO     arch/x86/boot/compressed/vmlinux.bin.lzo
> /bin/sh: 1: lzop: not found
> arch/x86/boot/compressed/Makefile:141: recipe for target 'arch/x86/boot/compressed/vmlinux.bin.lzo' failed
> make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lzo] Error 1
> arch/x86/boot/Makefile:112: recipe for target 'arch/x86/boot/compressed/vmlinux' failed
> make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
> arch/x86/Makefile:284: recipe for target 'bzImage' failed
> make: *** [bzImage] Error 2
> 
> Check the tools in scripts/Makefile.toolcheck to fail the build
> earlier with a more readable message.
> 
> [1] https://patchwork.kernel.org/patch/10635381/
> 
> Suggested-by: Borislav Petkov <bp@...e.de>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
> 
>  scripts/Makefile.toolcheck | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/scripts/Makefile.toolcheck b/scripts/Makefile.toolcheck
> index bc26fc0..5e336e4 100644
> --- a/scripts/Makefile.toolcheck
> +++ b/scripts/Makefile.toolcheck
> @@ -17,6 +17,14 @@ 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
>  
> +chk_lzo = command -v lzop
> +msg_lzo = "lzo tool not found. Please install it."
> +toolcheck-$(CONFIG_KERNEL_LZO) += lzo
> +
> +chk_lz4 = command -v lz4c
> +msg_lz4 = "lz4 tool not found. Please install it."
> +toolcheck-$(CONFIG_KERNEL_LZ4) += lz4
> +
>  PHONY += $(toolcheck-y)
>  __toolcheck: $(toolcheck-y)
>  
> -- 

Cool, thanks for doing that!

However, I applied all three, cleaned up the tree properly:

$ git clean -dqfx

and then used my .config (attached) which selects CONFIG_KERNEL_LZ4.

And I built it twice just to make sure I'm seeing correctly but the
error still happens at the end:

  DESCEND  objtool
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  Building modules, stage 2.
  CC      arch/x86/boot/compressed/misc.o
  LZ4     arch/x86/boot/compressed/vmlinux.bin.lz4
/bin/sh: 1: lz4c: not found
make[2]: *** [arch/x86/boot/compressed/Makefile:143: arch/x86/boot/compressed/vmlinux.bin.lz4] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/x86/boot/Makefile:112: arch/x86/boot/compressed/vmlinux] Error 2
make: *** [arch/x86/Makefile:290: bzImage] Error 2
make: *** Waiting for unfinished jobs....
  MODPOST 956 modules

What am I missing?

Thx.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

View attachment "config.lz4" of type "text/plain" (143665 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ