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-next>] [day] [month] [year] [list]
Date:   Tue, 17 Jan 2023 13:19:19 +0000
From:   Thomas Weißschuh <thomas@...ch.de>
To:     Thomas Weißschuh <linux@...ssschuh.net>,
        Masahiro Yamada <masahiroy@...nel.org>,
        linux-kbuild@...r.kernel.org,
        Amy Parker <apark0006@...dent.cerritos.edu>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kheaders: explicitly validate existence of cpio command

On Tue, Jan 17, 2023 at 09:46:02AM +0100, Nicolas Schier wrote:
> On Tue, Jan 17, 2023 at 05:30:43AM +0000, Thomas Weißschuh wrote:
> > If the cpio command is not available the error emitted by
> > gen_kheaders.so is not clear as all output of the call to cpio is
> > discarded:
> > 
> > GNU make 4.4:
> > 
> >   GEN     kernel/kheaders_data.tar.xz
> > find: 'standard output': Broken pipe
> > find: write error
> > make[2]: *** [kernel/Makefile:157: kernel/kheaders_data.tar.xz] Error 127
> > make[1]: *** [scripts/Makefile.build:504: kernel] Error 2
> > 
> > GNU make < 4.4:
> > 
> >   GEN     kernel/kheaders_data.tar.xz
> > make[2]: *** [kernel/Makefile:157: kernel/kheaders_data.tar.xz] Error 127
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [scripts/Makefile.build:504: kernel] Error 2
> > 
> > Add an explicit check that will trigger a clear message about the issue:
> > 
> >   CHK     kernel/kheaders_data.tar.xz
> > ./kernel/gen_kheaders.sh: line 17: type: cpio: not found
> 
> Thanks for the patch!  What would you think about an even more verbose
> message?  Perhaps something like:
> 
>     echo >&2 ' *** "cpio" is required for "CONFIG_IKHEADERS". >&2

Wouldn't hurt obviously.
The other scripts used by the kernel don't seem to try to provide this
kind of explicit message either, though.
Having a line number, some sort of "not found" and the name of the
command are enough, in my opinion.

> Reviewed-by: Nicolas Schier <n.schier@....de>

Thanks!

Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ