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: <20170412064919.92449-6-davidcc@google.com>
Date:   Tue, 11 Apr 2017 23:49:17 -0700
From:   David Carrillo-Cisneros <davidcc@...gle.com>
To:     linux-kernel@...r.kernel.org
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>,
        David Carrillo-Cisneros <davidcc@...gle.com>
Subject: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key

My fat-fingering of sort keys in .perfconfig was a common cause of
perf report silently terminating without apparent error.

This was because 1) error in setup_sorting in cmd_report was ignored
and 2) no message was log in UI browser that would prevent UI from
exit before user prompt. Fix both.

Signed-off-by: David Carrillo-Cisneros <davidcc@...gle.com>
---
 tools/perf/builtin-report.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index c18158b83eb1..19a69ca0e9c9 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -987,12 +987,15 @@ int cmd_report(int argc, const char **argv)
 	else
 		use_browser = 0;
 
-	if (setup_sorting(session->evlist) < 0) {
+	ret = setup_sorting(session->evlist);
+	if (ret < 0) {
 		if (sort_order)
 			parse_options_usage(report_usage, options, "s", 1);
 		if (field_order)
 			parse_options_usage(sort_order ? NULL : report_usage,
 					    options, "F", 1);
+		if (!sort_order && !field_order)
+			pr_err("Couldn't setup sort order. Is .perfconfig correct?\n");
 		goto error;
 	}
 
-- 
2.12.2.715.g7642488e1d-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ