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]
Message-ID: <1457455673-12219-1-git-send-email-james.hogan@imgtec.com>
Date:	Tue, 8 Mar 2016 16:47:53 +0000
From:	James Hogan <james.hogan@...tec.com>
To:	Ralf Baechle <ralf@...ux-mips.org>, Michal Marek <mmarek@...e.com>,
	"Andi Kleen" <ak@...ux.intel.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>
CC:	James Hogan <james.hogan@...tec.com>,
	"Michael S. Tsirkin" <mst@...hat.com>, <linux-mips@...ux-mips.org>,
	<linux-kbuild@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<stable@...r.kernel.org>
Subject: [PATCH] ld-version: Fix awk regex compile failure

The ld-version.sh script fails on some versions of awk with the
following error, resulting in build failures for MIPS:

awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(')

This is due to the regular expression ".*)", meant to strip off the
beginning of the ld version string up to the close bracket, however
brackets have a meaning in regular expressions, so lets escape it so
that awk doesn't expect a corresponding open bracket.

Fixes: ccbef1674a15 ("Kbuild, lto: add ld-version and ld-ifversion ...")
Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: James Hogan <james.hogan@...tec.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Michal Marek <mmarek@...e.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>
Cc: linux-mips@...ux-mips.org
Cc: linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: <stable@...r.kernel.org> # 4.4.x-
---
I've only tested this with GNU Awk 4.0.2, which seems a bit more
lenient than whatever version of awk Geert's build machine is using.

I'd appreciated if somebody experiencing the error could give this patch
a spin to check it fixes it.
---
 scripts/ld-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index d154f0877fd8..7bfe9fa1c8dc 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/awk -f
 # extract linker version number from stdin and turn into single number
 	{
-	gsub(".*)", "");
+	gsub(".*\\)", "");
 	gsub(".*version ", "");
 	gsub("-.*", "");
 	split($1,a, ".");
-- 
2.4.10

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ