summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorTomas Glozar <tglozar@redhat.com>2026-08-14 15:55:09 +0200
committerTomas Glozar <tglozar@redhat.com>2026-09-22 13:41:41 +0200
commitb105ffc19d5e53058cba68a9b8b7915216f0bf46 (patch)
treeb01e81fc14a5b93348f373378d93653d3c9d0304 /tools/perf/scripts/python/stackcollapse.py
parentbdb4d4d5db22bfacade381cf67fe87187b9d6412 (diff)
rtla: Abort on nr_cpus mismatch with tracer
In rare situations, sysfs might report a different number of CPUs than the kernel sees, for example, when /sys is not real sysfs. In tracefs mode, RTLA will discard any samples that are reported on CPUs higher than the maximum in sysfs. However, in BPF mode, the incorrectly sized BPF_MAP_LOOKUP_ELEM syscall on percpu maps will cause a buffer overflow. To cover for this corner case, write "all" to osnoise/cpus, and read back the real kernel-side list of all possible cpus. If it doesn't match RTLA's nr_cpus (read from sysfs), abort with an error. Assisted-by: Claude:claude-opus-4-6 Link: https://lore.kernel.org/r/20260814135511.2207190-4-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions