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: <20210726123854.13463-2-lihuafei1@huawei.com>
Date:   Mon, 26 Jul 2021 20:38:54 +0800
From:   Li Huafei <lihuafei1@...wei.com>
To:     <acme@...nel.org>, <james.clark@....com>, <jolsa@...nel.org>
CC:     <peterz@...radead.org>, <mark.rutland@....com>, <mingo@...hat.com>,
        <alexander.shishkin@...ux.intel.com>, <namhyung@...nel.org>,
        <mliska@...e.cz>, <irogers@...gle.com>, <dzhu@...ecomp.com>,
        <rickyman7@...il.com>, <yao.jin@...ux.intel.com>,
        <linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <zhangjinhao2@...wei.com>
Subject: [PATCH 2/2] perf annotate: Add error log in symbol__annotate()

When users use the perf annotate feature on unsupported machines, error
logs should be printed for user feedback.

Signed-off-by: Li Huafei <lihuafei1@...wei.com>
---
 tools/perf/util/annotate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index aa04a3655236..cb280de3369f 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -2192,8 +2192,10 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,
 		return errno;
 
 	args.arch = arch = arch__find(arch_name);
-	if (arch == NULL)
+	if (arch == NULL) {
+		pr_err("%s: unsupported arch %s\n", __func__, arch_name);
 		return ENOTSUP;
+	}
 
 	if (parch)
 		*parch = arch;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ