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

From: patchwork-bot+linux-riscv

Date: Wed Apr 29 2026 - 23:28:39 EST


Hello:

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

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