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] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-dc89e75a9412db5b1105a140182ec1e35a8351b4@git.kernel.org>
Date:	Fri, 3 Jun 2016 03:52:18 -0700
From:	tip-bot for Vineet Gupta <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-snps-arc@...ts.infradead.org, peterz@...radead.org,
	jolsa@...hat.com, alexander.shishkin@...ux.intel.com,
	hpa@...or.com, tglx@...utronix.de, Vineet.Gupta1@...opsys.com,
	torvalds@...ux-foundation.org, mingo@...nel.org,
	eranian@...gle.com, vincent.weaver@...ne.edu,
	linux-kernel@...r.kernel.org, vgupta@...opsys.com, acme@...hat.com
Subject: [tip:perf/core] tools/perf: Handle -EOPNOTSUPP for sampling events

Commit-ID:  dc89e75a9412db5b1105a140182ec1e35a8351b4
Gitweb:     http://git.kernel.org/tip/dc89e75a9412db5b1105a140182ec1e35a8351b4
Author:     Vineet Gupta <Vineet.Gupta1@...opsys.com>
AuthorDate: Mon, 9 May 2016 15:07:39 +0530
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 3 Jun 2016 09:41:11 +0200

tools/perf: Handle -EOPNOTSUPP for sampling events

This allows (with a previous change to the perf error return ABI) for
calling out in userspace the exact reason for perf record failing
when PMU doesn't support overflow interrupts.

Note that this needs to be put ahead of existing precise_ip check as
that gets hit otherwise for the sampling fail case as well.

Signed-off-by: Vineet Gupta <vgupta@...opsys.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: <acme@...hat.com>
Cc: <linux-snps-arc@...ts.infradead.org>
Cc: <vincent.weaver@...ne.edu>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Cc: Vineet Gupta <Vineet.Gupta1@...opsys.com>
Link: http://lkml.kernel.org/r/1462786660-2900-2-git-send-email-vgupta@synopsys.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 tools/perf/util/evsel.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 245ac50..8d30cbd 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2384,6 +2384,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 	 "No such device - did you specify an out-of-range profile CPU?");
 		break;
 	case EOPNOTSUPP:
+		if (evsel->attr.sample_period != 0)
+			return scnprintf(msg, size, "%s",
+	"PMU Hardware doesn't support sampling/overflow-interrupts.");
 		if (evsel->attr.precise_ip)
 			return scnprintf(msg, size, "%s",
 	"\'precise\' request may not be supported. Try removing 'p' modifier.");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ