Re: [PATCH] bpf: test_maps: Avoid possible out of bound access

2019-02-05 Thread Breno Leitao
Hi Daniel, On 2/4/19 6:57 PM, Daniel Borkmann wrote: > There are couple more test_*() functions that need to be converted if we do > the change to unsigned: > > tools/testing/selftests/bpf/test_maps.c:48:static void test_hashmap(int task, > void *data) > tools/testing/selftests/bpf/test_maps.c:1

Re: [PATCH] bpf: test_maps: Avoid possible out of bound access

2019-02-04 Thread Daniel Borkmann
On 02/04/2019 05:27 PM, Breno Leitao wrote: > When compiling test_maps selftest with GCC-8, it warns that an array might > be indexed with a negative value, which could cause a negative out of bound > access, depending on parameters of the function. This is the GCC-8 warning: > > gcc -Wall -

Re: [PATCH] bpf: test_maps: Avoid possible out of bound access

2019-02-04 Thread David Miller
From: Breno Leitao Date: Mon, 4 Feb 2019 14:27:11 -0200 > When compiling test_maps selftest with GCC-8, it warns that an array might > be indexed with a negative value, which could cause a negative out of bound > access, depending on parameters of the function. This is the GCC-8 warning: > >

[PATCH] bpf: test_maps: Avoid possible out of bound access

2019-02-04 Thread Breno Leitao
When compiling test_maps selftest with GCC-8, it warns that an array might be indexed with a negative value, which could cause a negative out of bound access, depending on parameters of the function. This is the GCC-8 warning: gcc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../..