[PATCH] RISC-V: KVM: Fix invalid HVA warning in steal-time recording

patchwork-bot+linux-riscv at kernel.org patchwork-bot+linux-riscv at kernel.org
Fri Jun 26 01:21:05 PDT 2026


Hello:

This patch was applied to riscv/linux.git (fixes)
by Anup Patel <anup at brainfault.org>:

On Wed, 15 Apr 2026 07:52:16 +0000 you wrote:
> kvm_riscv_vcpu_record_steal_time() assumes that the steal-time shared
> memory GPA (vcpu->arch.sta.shmem) is always backed by a valid guest
> memory slot. However, this assumption is not guaranteed by the KVM
> userspace ABI.
> 
> A malicious or buggy userspace can set the STA shared memory GPA via
> KVM_SET_ONE_REG without establishing a corresponding memory region via
> KVM_SET_USER_MEMORY_REGION. In such cases, the GPA cannot be translated
> to a valid HVA and kvm_vcpu_gfn_to_hva() returns an error address.
> 
> [...]

Here is the summary with links:
  - RISC-V: KVM: Fix invalid HVA warning in steal-time recording
    https://git.kernel.org/riscv/c/653f17c74260

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





More information about the kvm-riscv mailing list