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]
Date:	Sun, 8 Jan 2012 23:24:38 -0800
From:	tip-bot for Namhyung Kim <namhyung@...il.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
	hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
	namhyung@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] perf top: Add error message for EMFILE

Commit-ID:  cdce445906852d90efdc773ca7ba460e6e41664d
Gitweb:     http://git.kernel.org/tip/cdce445906852d90efdc773ca7ba460e6e41664d
Author:     Namhyung Kim <namhyung@...il.com>
AuthorDate: Sun, 8 Jan 2012 02:25:27 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sun, 8 Jan 2012 13:26:11 -0200

perf top: Add error message for EMFILE

When a user tries to open so many events, perf_event_open syscall may
fail with EMFILE. Provide advise for that case.

Cc: Ingo Molnar <mingo@...e.hu>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1325957132-10600-3-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim <namhyung@...il.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-top.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index d89dec9..8f80df8 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -888,6 +888,10 @@ try_again:
 				ui__warning("The %s event is not supported.\n",
 					    event_name(counter));
 				goto out_err;
+			} else if (err == EMFILE) {
+				ui__warning("Too many events are opened.\n"
+					    "Try again after reducing the number of events\n");
+				goto out_err;
 			}
 
 			ui__warning("The sys_perf_event_open() syscall "
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ