summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sched-migration.py
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn@rivosinc.com>2024-11-04 22:15:01 +0300
committerAnup Patel <anup@brainfault.org>2024-11-05 10:57:32 +0300
commit332fa4a802b16ccb727199da685294f85f9880cb (patch)
tree8e0fe1c41d7ccd7b8c9e010c44f9016ab7101b9b /tools/perf/scripts/python/sched-migration.py
parent60821fb4dd7345e5662094accf0a52845306de8c (diff)
downloadlinux-332fa4a802b16ccb727199da685294f85f9880cb.tar.xz
riscv: kvm: Fix out-of-bounds array access
In kvm_riscv_vcpu_sbi_init() the entry->ext_idx can contain an out-of-bound index. This is used as a special marker for the base extensions, that cannot be disabled. However, when traversing the extensions, that special marker is not checked prior indexing the array. Add an out-of-bounds check to the function. Fixes: 56d8a385b605 ("RISC-V: KVM: Allow some SBI extensions to be disabled by default") Signed-off-by: Björn Töpel <bjorn@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20241104191503.74725-1-bjorn@kernel.org Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions