<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/test_maps.c, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-04-05T20:34:42Z</updated>
<entry>
<title>bpf: test_maps: fix possible out of bound access warning</title>
<updated>2019-04-05T20:34:42Z</updated>
<author>
<name>Breno Leitao</name>
</author>
<published>2019-02-05T17:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90c93fbede11ba262bea4e377b0c65a9d6f72d4e'/>
<id>urn:sha1:90c93fbede11ba262bea4e377b0c65a9d6f72d4e</id>
<content type='text'>
[ Upstream commit dd9cef43c222df7c0d76d34451808e789952379d ]

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../../../lib/bpf -I../../../../include/generated -DHAVE_GENHDR -I../../../include    test_maps.c /home/breno/Devel/linux/tools/testing/selftests/bpf/libbpf.a -lcap -lelf -lrt -lpthread -o /home/breno/Devel/linux/tools/testing/selftests/bpf/test_maps
	In file included from test_maps.c:16:
	test_maps.c: In function ‘run_all_tests’:
	test_maps.c:1079:10: warning: array subscript -1 is below array bounds of ‘pid_t[&lt;Ube20&gt; + 1]’ [-Warray-bounds]
	   assert(waitpid(pid[i], &amp;status, 0) == pid[i]);
		  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
	test_maps.c:1059:6: warning: array subscript -1 is below array bounds of ‘pid_t[&lt;Ube20&gt; + 1]’ [-Warray-bounds]
	   pid[i] = fork();
	   ~~~^~~

This patch simply guarantees that the task(s) variables are unsigned,
thus, they could never be a negative number (which they are not in
current code anyway), hence avoiding an out of bound access warning.

Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: fix error printing in test_devmap()</title>
<updated>2019-01-01T12:48:59Z</updated>
<author>
<name>Xiaozhou Liu</name>
</author>
<published>2018-12-21T09:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b6b25cf93b73e8e399adc55b0ffb9db32b881e0'/>
<id>urn:sha1:8b6b25cf93b73e8e399adc55b0ffb9db32b881e0</id>
<content type='text'>
As a simple fix, just print the correct map type.

Signed-off-by: Xiaozhou Liu &lt;liuxiaozhou@bytedance.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: adding tests for map_in_map helpber in libbpf</title>
<updated>2018-11-21T22:33:22Z</updated>
<author>
<name>Nikita V. Shirokov</name>
</author>
<published>2018-11-21T04:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1957c92eba5acad7d8a0a6f968561e08714e978'/>
<id>urn:sha1:b1957c92eba5acad7d8a0a6f968561e08714e978</id>
<content type='text'>
adding test/example of bpf_map__set_inner_map_fd usage

Signed-off-by: Nikita V. Shirokov &lt;tehnerd@tehnerd.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>tools: add selftest for BPF_F_ZERO_SEED</title>
<updated>2018-11-19T23:53:40Z</updated>
<author>
<name>Lorenz Bauer</name>
</author>
<published>2018-11-16T11:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf5d68c7304008ef838f1a2ca1aae8fab74d633d'/>
<id>urn:sha1:bf5d68c7304008ef838f1a2ca1aae8fab74d633d</id>
<content type='text'>
Check that iterating two separate hash maps produces the same
order of keys if BPF_F_ZERO_SEED is used.

Signed-off-by: Lorenz Bauer &lt;lmb@cloudflare.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: add test cases for queue and stack maps</title>
<updated>2018-10-19T20:24:31Z</updated>
<author>
<name>Mauricio Vasquez B</name>
</author>
<published>2018-10-18T13:16:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43b987d23d6bd08db41a9c4a85aacfb3f0b2a94c'/>
<id>urn:sha1:43b987d23d6bd08db41a9c4a85aacfb3f0b2a94c</id>
<content type='text'>
test_maps:
Tests that queue/stack maps are behaving correctly even in corner cases

test_progs:
Tests new ebpf helpers

Signed-off-by: Mauricio Vasquez B &lt;mauricio.vasquez@polito.it&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: test_maps, only support ESTABLISHED socks</title>
<updated>2018-09-22T00:46:42Z</updated>
<author>
<name>John Fastabend</name>
</author>
<published>2018-09-18T16:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5028027844cfc6168e39650abecd817ba64c9d98'/>
<id>urn:sha1:5028027844cfc6168e39650abecd817ba64c9d98</id>
<content type='text'>
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.

Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: test: fix spelling mistake "REUSEEPORT" -&gt; "REUSEPORT"</title>
<updated>2018-08-14T17:43:27Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2018-08-13T14:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26a1ccc6c117be8e33e0410fce8c5298b0015b99'/>
<id>urn:sha1:26a1ccc6c117be8e33e0410fce8c5298b0015b99</id>
<content type='text'>
Trivial fix to spelling mistake in error message

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf: test BPF_MAP_TYPE_REUSEPORT_SOCKARRAY</title>
<updated>2018-08-10T23:58:46Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2018-08-08T08:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6bc8529c414f931ce0acef3099b015cf2f5c4291'/>
<id>urn:sha1:6bc8529c414f931ce0acef3099b015cf2f5c4291</id>
<content type='text'>
This patch adds tests for the new BPF_MAP_TYPE_REUSEPORT_SOCKARRAY.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: add map tests for BPF_PROG_TYPE_SK_MSG</title>
<updated>2018-03-19T20:14:39Z</updated>
<author>
<name>John Fastabend</name>
</author>
<published>2018-03-18T19:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82a8616889d506cb690cfc0afb2ccadda120461d'/>
<id>urn:sha1:82a8616889d506cb690cfc0afb2ccadda120461d</id>
<content type='text'>
Add map tests to attach BPF_PROG_TYPE_SK_MSG types to a sockmap.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: unify rlimit handling in selftests</title>
<updated>2018-02-27T04:11:23Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2018-02-26T21:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe8d662aef26394388bfcd3b96ce123b6d33044b'/>
<id>urn:sha1:fe8d662aef26394388bfcd3b96ce123b6d33044b</id>
<content type='text'>
Unify memlock handling into bpf_rlimit.h and replace all occurences
in BPF kselftests with it.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
