diff options
author | Viacheslav Mitrofanov <[email protected]> | 2023-05-05 07:20:57 +0000 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2023-06-20 12:55:24 -0700 |
commit | ee95b88d71b9cf7ac1085ebc014f161971e1be9a (patch) | |
tree | d49f81b52150bff37bc7be32b9fcc2ce608fcbd6 /arch/riscv/kernel/smpboot.c | |
parent | 4681dacadeefa5ca6017e00736adc1d7dc963c6a (diff) |
perf: RISC-V: Limit the number of counters returned from SBI
Perf gets the number of supported counters from SBI. If it happens that
the number of returned counters more than RISCV_MAX_COUNTERS the code
trusts it. It does not lead to an immediate problem but can potentially
lead to it. Prevent getting more than RISCV_MAX_COUNTERS from SBI.
Signed-off-by: Viacheslav Mitrofanov <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'arch/riscv/kernel/smpboot.c')
0 files changed, 0 insertions, 0 deletions