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

From: patchwork-bot+linux-riscv

Date: Fri Jun 26 2026 - 04:27:45 EST


Hello:

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

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