[PATCH v2] RISC-V: KVM: Fix shift-out-of-bounds in make_xfence_request()

patchwork-bot+linux-riscv at kernel.org patchwork-bot+linux-riscv at kernel.org
Wed Apr 29 20:25:03 PDT 2026


Hello:

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

On Fri,  3 Apr 2026 23:20:11 +0000 you wrote:
> The make_xfence_request() function uses a shift operation to check if a
> vCPU is in the hart mask:
> 
>   if (!(hmask & (1UL << (vcpu->vcpu_id - hbase))))
> 
> However, when the difference between vcpu_id and hbase
> is >= BITS_PER_LONG, the shift operation causes undefined behavior.
> 
> [...]

Here is the summary with links:
  - [v2] RISC-V: KVM: Fix shift-out-of-bounds in make_xfence_request()
    https://git.kernel.org/riscv/c/ddbf9c76c402

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





More information about the linux-riscv mailing list