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-next>] [day] [month] [year] [list]
Message-ID: <20251203214706.112174-1-irogers@google.com>
Date: Wed,  3 Dec 2025 13:46:59 -0800
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>, 
	James Clark <james.clark@...aro.org>, Thomas Richter <tmricht@...ux.ibm.com>, 
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/7] Perf stat --null/offline CPU segv related fixes/tests

Ingo reported [1] that `perf stat --null` was segfaulting. Fix the
underlying issue and add a test to the "perf stat tests". Do some
related fixing/cleanup in the perf util cpumap code.

Thomas reported an issue fixed by the same patches [2] but caused by
giving perf stat an offline CPU. Add test coverage for that and
improve the "error" message that reports "success".

Ingo further pointed at broken signal handling in repeat mode [3]. I
observed we weren't giving the best exit code, 0 rather than the
expected 128+<signal number>. Add a patch fixing this.

[1] https://lore.kernel.org/linux-perf-users/aSwt7yzFjVJCEmVp@gmail.com/
[2] https://lore.kernel.org/linux-perf-users/94313b82-888b-4f42-9fb0-4585f9e90080@linux.ibm.com/
[3] https://lore.kernel.org/lkml/aS5wjmbAM9ka3M2g@gmail.com/

Ian Rogers (7):
  perf stat: Allow no events to open if this is a "--null" run
  libperf cpumap: Fix perf_cpu_map__max for an empty/NULL map
  perf cpumap: Add "any" CPU handling to cpu_map__snprint_mask
  perf tests stat: Add "--null" coverage
  perf stat: When no events, don't report an error if there is none
  perf tests stat: Add test for error for an offline CPU
  perf stat: Improve handling of termination by signal

 tools/lib/perf/cpumap.c        | 10 +++++----
 tools/perf/builtin-stat.c      | 29 ++++++++++++++++++-------
 tools/perf/tests/shell/stat.sh | 39 ++++++++++++++++++++++++++++++++++
 tools/perf/util/cpumap.c       |  9 ++++++--
 4 files changed, 73 insertions(+), 14 deletions(-)

-- 
2.52.0.177.g9f829587af-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ