summaryrefslogtreecommitdiff
path: root/lib/utils/cache/objects.mk
diff options
context:
space:
mode:
authorAlexander Chuprunov <[email protected]>2025-09-18 12:07:06 +0300
committerAnup Patel <[email protected]>2025-10-27 16:59:42 +0530
commitac16c6b604961525bb096c0513c6ad4dbf5a5695 (patch)
tree6ab3b1b1fd585a6811c8dfd626a0ca84f8771010 /lib/utils/cache/objects.mk
parent63aacbd7826c539a46c108d0e055db57cb335eb2 (diff)
lib: sbi: sbi_pmu: added checks for ctr_idx in match
Previously, in sbi_pmu_ctr_cfg_match() function, ctr_idx was used immediately after pmu_ctr_find_fw() or pmu_ctr_find_hw() calls. In first case, array index was (ctr_idx - num_hw_ctrs), in second - ctr_idx. But pmu_ctr_find_fw() and pmu_ctr_find_hw() functions can return negative value, in which case writing in arrays with such indexes would corrupt sbi_pmu_hart_state structure. To avoid this situation, direct ctr_idx value check added. Signed-off-by: Alexander Chuprunov <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/cache/objects.mk')
0 files changed, 0 insertions, 0 deletions