On Tue, Feb 18, 2025 at 12:02:40AM -0800, Song Liu wrote: > 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'): > > Silent these warnings by casting imm to u32 first. > > Fixes: fd868f148189 ("bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates") > Reported-by: Breno Leitao <leitao@xxxxxxxxxx> > Signed-off-by: Song Liu <song@xxxxxxxxxx> Tested-by: Breno Leitao <leitao@xxxxxxxxxx>