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: <70d3e6cb-2ea3-1006-9af8-126cd3ea7fbb@landley.net>
Date:   Mon, 16 Apr 2018 07:19:11 -0500
From:   Rob Landley <rob@...dley.net>
To:     Russell King - ARM Linux <linux@...linux.org.uk>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kstewart@...uxfoundation.org, pombredanne@...b.com,
        tglx@...utronix.de, gregkh@...uxfoundation.org,
        linux-arm-kernel@...ts.infradead.org,
        Tony Lindgren <tony@...mide.com>, Keerthy <j-keerthy@...com>
Subject: Re: [PATCH] Replace unnecessary perl with sed, printf, and the shell
 $(( )) operator.

On 04/16/2018 07:09 AM, Russell King - ARM Linux wrote:
> On Wed, Apr 11, 2018 at 08:38:37PM -0500, Rob Landley wrote:
>> You can build a kernel in a cross compiling environment that doesn't have perl
>> in the $PATH. Commit 429f7a062e3b broke that for 32 bit arm. Fix it.
...
> This looks more complicated than necessary, and therefore less readable.
> What's wrong with:
> 
> KBSS_SZ := $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
> 		sed -n -e 's/^\([^ ]*\) B __bss_start$$/-0x\1/p' \
> 		       -e 's/^\([^ ]*\) B __bss_stop$$/+0x\1/p') ))
> 
> The sed command produces output such as:
> 
> -0xc0955e58
> +0xc10b0f9c
> 
> which the shell is then able to evaluate and produce a decimal number.
> This seems to work fine with both bash and dash.

Yes, that is better.

Acked-by: Rob Landley <rob@...dley.net>

Thanks,

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ