summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLukas Gerlach <lukas.gerlach@cispa.de>2026-01-16 12:57:31 +0300
committerAnup Patel <anup@brainfault.org>2026-03-06 08:50:30 +0300
commit8565617a8599dd17b96b7bf7e1eb19809ac6ae5e (patch)
treee292746984e5c13925c3aee325875b9d28cc8187 /include/linux
parent11439c4635edd669ae435eec308f4ab8a0804808 (diff)
downloadlinux-8565617a8599dd17b96b7bf7e1eb19809ac6ae5e.tar.xz
KVM: riscv: Fix Spectre-v1 in APLIC interrupt handling
Guests can control IRQ indices via MMIO. Sanitize them with array_index_nospec() to prevent speculative out-of-bounds access to the aplic->irqs[] array. Similar to arm64 commit 41b87599c743 ("KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_get_irq()") and x86 commit 8c86405f606c ("KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks"). Fixes: 74967aa208e2 ("RISC-V: KVM: Add in-kernel emulation of AIA APLIC") Signed-off-by: Lukas Gerlach <lukas.gerlach@cispa.de> Reviewed-by: Nutty Liu <nutty.liu@hotmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260116095731.24555-1-lukas.gerlach@cispa.de Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions