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: <tip-f6432b9f65001651412dbc3589d251534822d4ab@git.kernel.org>
Date:   Thu, 12 Jul 2018 07:01:57 -0700
From:   tip-bot for Kim Phillips <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     namhyung@...nel.org, acme@...hat.com, kim.phillips@....com,
        jolsa@...hat.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
        brueckner@...ux.vnet.ibm.com, mpetlan@...hat.com,
        tmricht@...ux.vnet.ibm.com, hpa@...or.com, peterz@...radead.org,
        alexander.shishkin@...ux.intel.com, mingo@...nel.org,
        sandipan@...ux.vnet.ibm.com
Subject: [tip:perf/urgent] perf llvm-utils: Remove bashism from kernel
 include fetch script

Commit-ID:  f6432b9f65001651412dbc3589d251534822d4ab
Gitweb:     https://git.kernel.org/tip/f6432b9f65001651412dbc3589d251534822d4ab
Author:     Kim Phillips <kim.phillips@....com>
AuthorDate: Fri, 29 Jun 2018 12:46:52 -0500
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 11 Jul 2018 10:01:51 -0300

perf llvm-utils: Remove bashism from kernel include fetch script

Like system(), popen() calls /bin/sh, which may/may not be bash.

Script when run on dash and encounters the line, yields:

 exit: Illegal number: -1

checkbashisms report on script content:

 possible bashism (exit|return with negative status code):
 exit -1

Remove the bashism and use the more portable non-zero failure
status code 1.

Signed-off-by: Kim Phillips <kim.phillips@....com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Hendrik Brueckner <brueckner@...ux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Michael Petlan <mpetlan@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Sandipan Das <sandipan@...ux.vnet.ibm.com>
Cc: Thomas Richter <tmricht@...ux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20180629124652.8d0af7e2281fd3fd8262cacc@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/llvm-utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 976e658e38dc..5e94857dfca2 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -266,16 +266,16 @@ static const char *kinc_fetch_script =
 "#!/usr/bin/env sh\n"
 "if ! test -d \"$KBUILD_DIR\"\n"
 "then\n"
-"	exit -1\n"
+"	exit 1\n"
 "fi\n"
 "if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
 "then\n"
-"	exit -1\n"
+"	exit 1\n"
 "fi\n"
 "TMPDIR=`mktemp -d`\n"
 "if test -z \"$TMPDIR\"\n"
 "then\n"
-"    exit -1\n"
+"    exit 1\n"
 "fi\n"
 "cat << EOF > $TMPDIR/Makefile\n"
 "obj-y := dummy.o\n"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ