Re: [PATCH bpf-next] bpf: arm64: Silent "UBSAN: negation-overflow" warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux