]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: RISC-V: reset smstateen CSRs
authorRadim Krčmář <rkrcmar@ventanamicro.com>
Thu, 3 Apr 2025 11:25:24 +0000 (13:25 +0200)
committerAnup Patel <anup@brainfault.org>
Thu, 1 May 2025 12:56:14 +0000 (18:26 +0530)
commit87ec7d5249bb8ebf40261420da069fa238c21789
tree7cce479079f8b04f8b2bac65b701e29079de5c21
parentb4432656b36e5cc1d50a1f2dc15357543add530e
KVM: RISC-V: reset smstateen CSRs

Not resetting smstateen is a potential security hole, because VU might
be able to access state that VS does not properly context-switch.

Fixes: 81f0f314fec9 ("RISCV: KVM: Add sstateen0 context save/restore")
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Link: https://lore.kernel.org/r/20250403112522.1566629-8-rkrcmar@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu.c