Re: [PATCH v3] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-11 Thread Daniel Borkmann
On 11/11/20 6:03 AM, xiakaixu1...@gmail.com wrote: From: Kaixu Xia The unsigned variable datasec_id is assigned a return value from the call to check_pseudo_btf_id(), which may return negative error code. Fixes coccicheck warning: ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expressio

Re: [PATCH v3] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-11 Thread John Fastabend
Andrii Nakryiko wrote: > On Tue, Nov 10, 2020 at 9:03 PM wrote: > > > > From: Kaixu Xia > > > > The unsigned variable datasec_id is assigned a return value from the call > > to check_pseudo_btf_id(), which may return negative error code. > > > > Fixes coccicheck warning: > > > > ./kernel/bpf/veri

Re: [PATCH v3] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-10 Thread Andrii Nakryiko
On Tue, Nov 10, 2020 at 9:03 PM wrote: > > From: Kaixu Xia > > The unsigned variable datasec_id is assigned a return value from the call > to check_pseudo_btf_id(), which may return negative error code. > > Fixes coccicheck warning: > > ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned express

[PATCH v3] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-10 Thread xiakaixu1987
From: Kaixu Xia The unsigned variable datasec_id is assigned a return value from the call to check_pseudo_btf_id(), which may return negative error code. Fixes coccicheck warning: ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expression compared with zero: datasec_id > 0 Reported-by: T