Re: [PATCH net v2] net: octeontx2-pf: Fix UB in shift operation

[email protected]
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <178602240564.840277.12436088481002390035.git-patchwork-notify@kernel.org>
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

On Tue, 4 Aug 2026 15:04:48 +0300 you wrote:
> From: "Sergey V. Frolov" <[email protected]>
> 
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.