mbox series

[0/1] Limit the number of counter returned from SBI.

Message ID 20230428110256.711352-1-v.v.mitrofanov@yadro.com (mailing list archive)
Headers show
Series Limit the number of counter returned from SBI. | expand

Message

Viacheslav Mitrofanov April 28, 2023, 11:02 a.m. UTC
Perf relies on reliability of SBI. If sth goes wrong the code trusts it.
It happened due to some debug process that I passed more than
RISCV_MAX_COUNTERS to perf from SBI. At the first glance there were
bloating of kalloced variable pmu_ctr_list and counter mask recycle write.
May be there were some other effects. But anyway it is better to add
extra check.

Viacheslav Mitrofanov (1):
  perf: RISC-V: Limit the number of counters returned from SBI.

 drivers/perf/riscv_pmu_sbi.c | 5 +++++
 1 file changed, 5 insertions(+)