[PATCH v2 1/2] perf: RISC-V: fix access beyond allocated array

Sergey Matyukevich geomatsi at gmail.com
Sun Jul 10 23:43:31 PDT 2022


> The root cause could be related to the interpretation of the number of
> counters reported by SBI firmware. For instance, if we assume that unused
> timer counter with index 1 is not reported, then the range is correct
> and larger array needs to be allocated.
> 
> This is not the case though since SBI firmware is supposed to report the
> total number of firmware and hardware counters including special or
> unused ones like the timer counter. So just fix the range in for-loop.

Hi Atish,

Just a friendly reminder.

Regards,
Sergey



More information about the linux-riscv mailing list