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: <20260205103036.GF3481290@e132581.arm.com>
Date: Thu, 5 Feb 2026 10:30:36 +0000
From: Leo Yan <leo.yan@....com>
To: Ian Rogers <irogers@...gle.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	James Clark <james.clark@...aro.org>,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf record: Make logs more readable for event open
 failures

On Wed, Feb 04, 2026 at 09:29:14AM -0800, Ian Rogers wrote:

[...]

> > This commit restores evsel__open_strerror() to generate a readable error
> > message and print it out:

> Lgtm and sorry for making things worse - I believe it was motivated by
> trying to avoid spammy warnings.
> 
> Reviewed-by: Ian Rogers <irogers@...gle.com>

Thanks for review, Ian.

Just wander if we can go a bit further.  My understanding is that now we only
handle the special case of duplicate "cycles" naming on Arm/Arm64, it is
not necessarily to tolerate other failure cases.

So could we report errors and directly bail out for other PMU event failure?
This somehow reverts to old neat log rather the duplicated error logs for
each events.  Something like:

---8<---

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 2584d0d8bc82..ca7d6805840a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1404,10 +1404,21 @@ static int record__open(struct record *rec)
                        }
 #endif
                        if (report_error || verbose > 0) {
+                               evsel__open_strerror(pos, &opts->target, errno, msg, sizeof(msg));
                                ui__error("Failure to open event '%s' on PMU '%s' which will be "
                                          "removed.\n%s\n",
                                          evsel__name(pos), evsel__pmu_name(pos), msg);
+
+                               /*
+                                * Only tolerate Arm cycle failures and bail out
+                                * on any other event failures.
+                                */
+                               if (report_error) {
+                                       rc = -errno;
+                                       goto out;
+                               }
                        }


If this is okay for you, I can send a updated patch.

Thanks,
Leo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ