Re: [PATCH] bpftool: Fix undefined behavior caused by shifting into the sign bit

From: patchwork-bot+netdevbpf
Date: Mon Sep 09 2024 - 19:00:33 EST


Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@xxxxxxxxxx>:

On Sun, 8 Sep 2024 22:00:09 +0800 you wrote:
> Replace shifts of '1' with '1U' in bitwise operations within
> __show_dev_tc_bpf() to prevent undefined behavior caused by shifting
> into the sign bit of a signed integer. By using '1U', the operations
> are explicitly performed on unsigned integers, avoiding potential
> integer overflow or sign-related issues.
>
> Signed-off-by: Kuan-Wei Chiu <visitorckw@xxxxxxxxx>
>
> [...]

Here is the summary with links:
- bpftool: Fix undefined behavior caused by shifting into the sign bit
https://git.kernel.org/bpf/bpf-next/c/4cdc0e4ce5e8

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