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-next>] [day] [month] [year] [list]
Date:	Thu,  5 Sep 2013 09:32:16 +0100
From:	Rodrigo Campos <rodrigo@...g.com.ar>
To:	linux-kernel@...r.kernel.org
Cc:	a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
	acme@...stprotocols.net, linux-perf-users@...r.kernel.org,
	Rodrigo Campos <rodrigo@...g.com.ar>
Subject: [PATCH] perf tools: Clarify error when running "perf lock record"

If you have the config options enabled in your kernel, you still need to be root
to run perf lock. And is kind of misleading when you have that options enabled
and the error says that they might not be.

So, this patch just adds to the error that it should be run as root. Although we
can probably check if it's running as root or not, adding it to the error
message is really simple and should be enough.

Signed-off-by: Rodrigo Campos <rodrigo@...g.com.ar>
---
Please keep me in Cc: since I'm not subscribed
---
 tools/perf/builtin-lock.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 76543a4..f07b318 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -886,8 +886,8 @@ static int __cmd_record(int argc, const char **argv)
 	for (i = 0; i < ARRAY_SIZE(lock_tracepoints); i++) {
 		if (!is_valid_tracepoint(lock_tracepoints[i].name)) {
 				pr_err("tracepoint %s is not enabled. "
-				       "Are CONFIG_LOCKDEP and CONFIG_LOCK_STAT enabled?\n",
-				       lock_tracepoints[i].name);
+				       "Are CONFIG_LOCKDEP and CONFIG_LOCK_STAT enabled "
+				       "and running as root?\n", lock_tracepoints[i].name);
 				return 1;
 		}
 	}
-- 
1.7.10.4

--
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