diff options
| author | Qingwei Hu <qingwei.hu@bytedance.com> | 2026-10-27 14:26:02 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-11-16 18:06:22 +0530 |
| commit | 1fd50d34d80053a2e319531d171db0ec1e59360b (patch) | |
| tree | 672e52f4241278bf090baa17043b9b7ac5c0ef6d /tools/perf/scripts/python/bin | |
| parent | f4eda00f503ed260b0269dbfe59e25ac04243f3c (diff) | |
RISC-V: KVM: Validate PMU counter info using available counters
COUNTER_GET_INFO validates the counter index using the pmc[] storage
capacity rather than the number of counters advertised by NUM_COUNTERS.
When fewer counters are available, a guest can query an index outside
the advertised range and receive success.
Validate the index using kvm_pmu_num_counters(), matching the counter
initialization and read paths.
Fixes: 8f0153ecd3bf ("RISC-V: KVM: Add skeleton support for perf")
Signed-off-by: Qingwei Hu <qingwei.hu@bytedance.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20261027062602.323691-1-qingwei.hu@bytedance.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
