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-7b4500bc519686712471924972022df88b12ff93@git.kernel.org>
Date:   Wed, 7 Jun 2017 08:56:02 -0700
From:   tip-bot for Ravi Bangoria <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     hpa@...or.com, linux-kernel@...r.kernel.org,
        borntraeger@...ibm.com, alexander.shishkin@...ux.intel.com,
        treeze.taeung@...il.com, mingo@...nel.org, acme@...hat.com,
        tglx@...utronix.de, ravi.bangoria@...ux.vnet.ibm.com,
        adam.stylinski@...gent.com, peterz@...radead.org
Subject: [tip:perf/urgent] perf annotate: Fix failure when filename has
 special chars

Commit-ID:  7b4500bc519686712471924972022df88b12ff93
Gitweb:     http://git.kernel.org/tip/7b4500bc519686712471924972022df88b12ff93
Author:     Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
AuthorDate: Fri, 5 May 2017 15:44:17 +0530
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sat, 27 May 2017 10:10:18 -0300

perf annotate: Fix failure when filename has special chars

When filename contains special chars, perf annotate fails
with an error:

  $ perf annotate --vmlinux ./vmlinux\(test\) --stdio native_safe_halt
    sh: -c: line 0: syntax error near unexpected token `('
    sh: -c: line 0: `objdump  --start-address=0xffffffff8184e840
    --stop-address=0xffffffff8184e848 -l -d --no-show-raw -S -C
    ./vmlinux(test) 2>/dev/null|grep -v ./vmlinux(test):|expand'

Fix it by surrounding filename in double quotes.

Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Cc: Adam Stylinski <adam.stylinski@...gent.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Christian Borntraeger <borntraeger@...ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Taeung Song <treeze.taeung@...il.com>
Link: http://lkml.kernel.org/r/20170505101417.2117-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 683f834..07d5608 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1429,7 +1429,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
 	snprintf(command, sizeof(command),
 		 "%s %s%s --start-address=0x%016" PRIx64
 		 " --stop-address=0x%016" PRIx64
-		 " -l -d %s %s -C %s 2>/dev/null|grep -v %s:|expand",
+		 " -l -d %s %s -C \"%s\" 2>/dev/null|grep -v \"%s:\"|expand",
 		 objdump_path ? objdump_path : "objdump",
 		 disassembler_style ? "-M " : "",
 		 disassembler_style ? disassembler_style : "",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ