Re: [PATCH net v2] net: octeontx2-pf: Fix UB in shift operation
From: patchwork-bot+netdevbpf
Date: Thu Aug 06 2026 - 09:25:44 EST
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:
On Tue, 4 Aug 2026 15:04:48 +0300 you wrote:
> From: "Sergey V. Frolov" <Sergey.V.Frolov@xxxxxxxxxxxxx>
>
> In function otx2_get_egress_burst_cfg, when the parameter `burst` is
> 255 and the max mantissa is 255 (0xFFULL), `burst_exp` is set to
> `ilog2(255) - 1`, which equals 6.
>
> This results in an unsigned wrap-around when calculating
> `(1ULL << (*burst_exp - 7))`, since `*burst_exp - 7` becomes -1,
> which makes the shift operand 0xFFFFFFFF. This value is greater than
> the width of the left operand.
>
> [...]
Here is the summary with links:
- [net,v2] net: octeontx2-pf: Fix UB in shift operation
https://git.kernel.org/netdev/net/c/7e2d693af0d4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html