Commit 23986082 authored by Song Liu's avatar Song Liu Committed by Alexei Starovoitov
Browse files

bpf: arm64: Silence "UBSAN: negation-overflow" warning



With UBSAN, test_bpf.ko triggers warnings like:

UBSAN: negation-overflow in arch/arm64/net/bpf_jit_comp.c:1333:28
negation of -2147483648 cannot be represented in type 's32' (aka 'int'):

Silence these warnings by casting imm to u32 first.

Reported-by: default avatarBreno Leitao <leitao@debian.org>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Tested-by: default avatarBreno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/20250218080240.2431257-1-song@kernel.org


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 201b62cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment