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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 3 Jun 2016 03:51:53 -0700
From:	tip-bot for Vineet Gupta <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, Vineet.Gupta1@...opsys.com, vgupta@...opsys.com,
	mingo@...nel.org, hpa@...or.com, torvalds@...ux-foundation.org,
	eranian@...gle.com, tglx@...utronix.de,
	linux-snps-arc@...ts.infradead.org, peterz@...radead.org,
	alexander.shishkin@...ux.intel.com, linux-kernel@...r.kernel.org,
	jolsa@...hat.com, vincent.weaver@...ne.edu
Subject: [tip:perf/core] perf/abi: Change the errno for sampling event not
 supported in hardware

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

perf/abi: Change the errno for sampling event not supported in hardware

Change the return code for sampling event not supported from -ENOTSUPP
to -EOPNOTSUPP.

This allows userspace to identify this case specifically, instead of
printing the catch-all error message it did previously.

Technically this is an ABI change, but we think we can get away
with it.

Old behavior:
 -------
 | # perf record ls
 | Error:
 | The sys_perf_event_open() syscall returned with 524 (Unknown error 524)
 | for event (cycles:ppp).
 | /bin/dmesg may provide additional information.
 | No CONFIG_PERF_EVENTS=y kernel support configured?

New behavior:
 -------
 | # perf record ls
 | Error:
 | PMU Hardware doesn't support sampling/overflow-interrupts.

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-3-git-send-email-vgupta@synopsys.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index f94f164..5d48306 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9309,7 +9309,7 @@ SYSCALL_DEFINE5(perf_event_open,
 
 	if (is_sampling_event(event)) {
 		if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) {
-			err = -ENOTSUPP;
+			err = -EOPNOTSUPP;
 			goto err_alloc;
 		}
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ