aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/smpboot.c
diff options
context:
space:
mode:
authorViacheslav Mitrofanov <[email protected]>2023-05-05 07:20:57 +0000
committerPalmer Dabbelt <[email protected]>2023-06-20 12:55:24 -0700
commitee95b88d71b9cf7ac1085ebc014f161971e1be9a (patch)
treed49f81b52150bff37bc7be32b9fcc2ce608fcbd6 /arch/riscv/kernel/smpboot.c
parent4681dacadeefa5ca6017e00736adc1d7dc963c6a (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