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-9a805d8648ee09c136130fe4114a09574bc0b1ef@git.kernel.org>
Date:   Mon, 4 Sep 2017 22:20:14 -0700
From:   tip-bot for Ravi Bangoria <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, namhyung@...nel.org, jolsa@...nel.org,
        tglx@...utronix.de, acme@...hat.com, mingo@...nel.org,
        ravi.bangoria@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
        mpe@...erman.id.au, alexander.shishkin@...ux.intel.com,
        adrian.hunter@...el.com, hpa@...or.com
Subject: [tip:perf/urgent] perf test powerpc: Fix 'Object code reading' test

Commit-ID:  9a805d8648ee09c136130fe4114a09574bc0b1ef
Gitweb:     http://git.kernel.org/tip/9a805d8648ee09c136130fe4114a09574bc0b1ef
Author:     Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
AuthorDate: Thu, 31 Aug 2017 14:44:56 +0530
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 1 Sep 2017 14:45:59 -0300

perf test powerpc: Fix 'Object code reading' test

'Object code reading' test always fails on powerpc guest. Two reasons
for the failure are:

1. When elf section is too big (size beyond 'unsigned int' max value).
objdump fails to disassemble from such section. This was fixed with
commit 0f6329bd7fc ("binutils/objdump: Fix disassemble for huge elf
sections") in binutils.

2. When the sample is from hypervisor. Hypervisor symbols can not be
resolved within guest and thus thread__find_addr_map() fails for such
symbols. Fix this by ignoring hypervisor symbols in the test.

Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Acked-by: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: linuxppc-dev@...ts.ozlabs.org
Link: http://lkml.kernel.org/r/1504170896-7876-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/tests/code-reading.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 761c5a4..466a462 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -237,6 +237,11 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
 
 	thread__find_addr_map(thread, cpumode, MAP__FUNCTION, addr, &al);
 	if (!al.map || !al.map->dso) {
+		if (cpumode == PERF_RECORD_MISC_HYPERVISOR) {
+			pr_debug("Hypervisor address can not be resolved - skipping\n");
+			return 0;
+		}
+
 		pr_debug("thread__find_addr_map failed\n");
 		return -1;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ