[PATCH] mm: riscv: fix an unsafe pte read in huge_pte_alloc()
patchwork-bot+linux-riscv at kernel.org
patchwork-bot+linux-riscv at kernel.org
Wed Jul 5 16:50:22 PDT 2023
Hello:
This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer at rivosinc.com>:
On Mon, 3 Jul 2023 12:00:44 -0700 you wrote:
> The WARN_ON_ONCE() statement in riscv's huge_pte_alloc() is susceptible
> to false positives, because the pte is read twice at the C language
> level, locklessly, within the same conditional statement. Depending on
> compiler behavior, this can lead to generated machine code that actually
> reads the pte just once, or twice. Reading twice will expose the code to
> changing pte values and cause incorrect behavior.
>
> [...]
Here is the summary with links:
- mm: riscv: fix an unsafe pte read in huge_pte_alloc()
https://git.kernel.org/riscv/c/62ba41d27612
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