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

Atish Patra atishp at atishpatra.org
Mon Jul 11 00:22:58 PDT 2022


On Sun, Jul 10, 2022 at 11:43 PM Sergey Matyukevich <geomatsi at gmail.com> wrote:
>
> > 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.
>

Sorry. I thought I already sent the RB tag.

> Regards,
> Sergey



-- 
Regards,
Atish



More information about the linux-riscv mailing list