summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorTomas Glozar <tglozar@redhat.com>2026-08-14 15:55:08 +0200
committerTomas Glozar <tglozar@redhat.com>2026-09-22 13:41:41 +0200
commitbdb4d4d5db22bfacade381cf67fe87187b9d6412 (patch)
tree525ee84a4d3fc7d9f692a678864a8c5971e49f2c /tools/perf/scripts/python/bin/stackcollapse-report
parentb3dc9905d7304cee7a114e85d9ad71004ea85d2f (diff)
rtla: Discard trace entries with cpu >= nr_cpus
The "cpu" field of trace entries processed by rtla in tracefs mode is used as an index into an array of size nr_cpus. In case the cpu numbers mismatch because either the kernel or rtla reporting the number incorrectly, out-of-bounds read/write may occur. Guard against this by dropping trace entries with cpu >= nr_cpus in collect_registered_events(). A new counter, "invalid_events", is added to struct trace_instance, and printed (if non zero) next to the pre-existing missed events counter. Link: https://lore.kernel.org/r/20260814135511.2207190-3-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions