<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-obmc-linux/tools/testing, branch dev-5.0-raptor-04-16-2019</title>
<subtitle>Blackbird™ Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/'/>
<updated>2019-04-05T20:34:48+00:00</updated>
<entry>
<title>selftests/bpf: suppress readelf stderr when probing for BTF support</title>
<updated>2019-04-05T20:34:48+00:00</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2019-01-24T16:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=931480457bb363aa6390cbb2eaa1dfac4b38ec44'/>
<id>urn:sha1:931480457bb363aa6390cbb2eaa1dfac4b38ec44</id>
<content type='text'>
[ Upstream commit 2f0921262ba943fe9d9f59037a033927d8c4789b ]

Before:
$ make -s -C tools/testing/selftests/bpf
readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF
sections of machine number 247
readelf: Warning: unable to apply unsupported reloc type 10 to section
.debug_info
readelf: Warning: unable to apply unsupported reloc type 1 to section
.debug_info
readelf: Warning: unable to apply unsupported reloc type 10 to section
.debug_info

After:
$ make -s -C tools/testing/selftests/bpf

v2:
* use llvm-readelf instead of redirecting binutils' readelf stderr to
  /dev/null

Signed-off-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&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: skip verifier tests for unsupported program types</title>
<updated>2019-04-05T20:34:45+00:00</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2019-01-28T17:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=cf651d7007c17bf1bb23fa3a2cb5d1dd2e301c65'/>
<id>urn:sha1:cf651d7007c17bf1bb23fa3a2cb5d1dd2e301c65</id>
<content type='text'>
[ Upstream commit 8184d44c9a577a2f1842ed6cc844bfd4a9981d8e ]

Use recently introduced bpf_probe_prog_type() to skip tests in the
test_verifier() if bpf_verify_program() fails. The skipped test is
indicated in the output.

Example:

...
679/p bpf_get_stack return R0 within range SKIP (unsupported program
type 5)
680/p ld_abs: invalid op 1 OK
...
Summary: 863 PASSED, 165 SKIPPED, 3 FAILED

Signed-off-by: Stanislav Fomichev &lt;sdf@google.com&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>bpf: test_maps: fix possible out of bound access warning</title>
<updated>2019-04-05T20:34:42+00:00</updated>
<author>
<name>Breno Leitao</name>
<email>leitao@debian.org</email>
</author>
<published>2019-02-05T17:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/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: skip seccomp get_metadata test if not real root</title>
<updated>2019-04-05T20:34:38+00:00</updated>
<author>
<name>Tycho Andersen</name>
<email>tycho@tycho.ws</email>
</author>
<published>2019-01-19T00:12:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=34968a446c4ee2163c129c27154fd88940c2c3ca'/>
<id>urn:sha1:34968a446c4ee2163c129c27154fd88940c2c3ca</id>
<content type='text'>
[ Upstream commit 3aa415dd2128e478ea3225b59308766de0e94d6b ]

The get_metadata() test requires real root, so let's skip it if we're not
real root.

Note that I used XFAIL here because that's what the test does later if
CONFIG_CHEKCKPOINT_RESTORE happens to not be enabled. After looking at the
code, there doesn't seem to be a nice way to skip tests defined as TEST(),
since there's no return code (I tried exit(KSFT_SKIP), but that didn't work
either...). So let's do it this way to be consistent, and easier to fix
when someone comes along and fixes it.

Signed-off-by: Tycho Andersen &lt;tycho@tycho.ws&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: ir: fix warning: "%s" directive output may be truncated ’ directive output may be truncated</title>
<updated>2019-04-05T20:34:38+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuah@kernel.org</email>
</author>
<published>2019-01-31T18:54:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=7981a5b4df776ca9be9747266784ebfc9fb7ad8a'/>
<id>urn:sha1:7981a5b4df776ca9be9747266784ebfc9fb7ad8a</id>
<content type='text'>
[ Upstream commit ed675ed9da6d951322efd72d739d6b5ce1c18f02 ]

Fix the following warning by sizing the buffer to max. of sysfs
path max. size + d_name max. size.

gcc -Wall -O2 -I../../../include/uapi ir_loopback.c  -o ../tools/testing/selftests/ir/ir_loopback
ir_loopback.c: In function ‘lirc_open’:
ir_loopback.c:71:37: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 95 [-Wformat-truncation=]
    snprintf(buf, sizeof(buf), "/dev/%s", dent-&gt;d_name);
                                     ^~
In file included from /usr/include/stdio.h:862:0,
                 from ir_loopback.c:14:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 6 and 261 bytes into a destination of size 100
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
Acked-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/bpf: selftests: add map lookup to test_map_in_map bpf prog</title>
<updated>2019-04-05T20:34:27+00:00</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2019-02-27T21:22:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=a133f9f7f96ad2b6d44d825e038d003db9b38dc3'/>
<id>urn:sha1:a133f9f7f96ad2b6d44d825e038d003db9b38dc3</id>
<content type='text'>
[ Upstream commit 9eca5083757b679b37f210092c871916c2c222d0 ]

The bpf_map_lookup_elem is added in the bpf program.
Without previous patch, the test change will trigger the
following error:
  $ ./test_maps
  ...
  ; value_p = bpf_map_lookup_elem(map, &amp;key);
  20: (bf) r1 = r7
  21: (bf) r2 = r8
  22: (85) call bpf_map_lookup_elem#1
  ; if (!value_p || *value_p != 123)
  23: (15) if r0 == 0x0 goto pc+16
   R0=map_value(id=2,off=0,ks=4,vs=4,imm=0) R6=inv1 R7=map_ptr(id=0,off=0,ks=4,vs=4,imm=0)
   R8=fp-8,call_-1 R10=fp0,call_-1 fp-8=mmmmmmmm
  ; if (!value_p || *value_p != 123)
  24: (61) r1 = *(u32 *)(r0 +0)
   R0=map_value(id=2,off=0,ks=4,vs=4,imm=0) R6=inv1 R7=map_ptr(id=0,off=0,ks=4,vs=4,imm=0)
   R8=fp-8,call_-1 R10=fp0,call_-1 fp-8=mmmmmmmm
  bpf_spin_lock cannot be accessed directly by load/store

With the kernel fix in the previous commit, the error goes away.

Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: firmware: fix verify_reqs() return value</title>
<updated>2019-03-10T06:09:01+00:00</updated>
<author>
<name>Luis Chamberlain</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2019-02-07T19:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=302f4908d4f99ff84b714f2c9a990df8a667e91a'/>
<id>urn:sha1:302f4908d4f99ff84b714f2c9a990df8a667e91a</id>
<content type='text'>
commit 344c0152d878922365464b7140c74c2a5e073d99 upstream.

commit a6a9be9270c87 ("selftests: firmware: return Kselftest Skip code
for skipped tests") by Shuah modified failures to return the special
error code of $ksft_skip (4). We have a corner case issue where we
*do* want to verify_reqs().

Cc: &lt;stable@vger.kernel.org&gt; # &gt;= 4.18
Fixes: a6a9be9270c87 ("selftests: firmware: return Kselftest Skip code for for skipped tests")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "selftests: firmware: remove use of non-standard diff -Z option"</title>
<updated>2019-03-10T06:09:01+00:00</updated>
<author>
<name>Luis Chamberlain</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2019-02-07T19:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=5e73c19ca66e14f2eb62fff77ba31202e729ffea'/>
<id>urn:sha1:5e73c19ca66e14f2eb62fff77ba31202e729ffea</id>
<content type='text'>
commit 13ac7db09c914e4991a08b7ad578267d5cdd9856 upstream.

This reverts commit f70b472e937bb659a7b7a14e64f07308e230888c.

This breaks testing on Debian, and this patch was NACKed anyway.
The proper way to address this is a quirk for busybox as that is
where the issue is present.

Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Fixes: f70b472e937b ("selftests: firmware: remove use of non-standard diff -Z option")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config"</title>
<updated>2019-03-10T06:09:01+00:00</updated>
<author>
<name>Luis Chamberlain</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2019-02-07T19:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=66da661f94ebb943b54bb07e788a7371116d0a86'/>
<id>urn:sha1:66da661f94ebb943b54bb07e788a7371116d0a86</id>
<content type='text'>
commit d2b284d356e9758d2bafd505d482e3c9433ef424 upstream.

This reverts commit 7492902e8d22b568463897fa967c0886764cf034.

The commit tried to address an issue discovered by Dan where he got
a message saying:

'usermode helper disabled so ignoring test'.

Dans's commit is forcing CONFIG_FW_LOADER_USER_HELPER_FALLBACK but just
having CONFIG_FW_LOADER_USER_HELPER suffices to emulate the_FALLBACK
functionality.

Dan's commit is trying to fix an issue which is hidden from a previous
commit. That issue will be addressed properly next.

Fixes: 7492902e8d22 ("selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>selftests: fixes for UDP GRO</title>
<updated>2019-03-01T19:24:00+00:00</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2019-02-26T14:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=ada641ff6ed34a125fbf62ec79733352ffd4305d'/>
<id>urn:sha1:ada641ff6ed34a125fbf62ec79733352ffd4305d</id>
<content type='text'>
The current implementation for UDP GRO tests is racy: the receiver
may flush the RX queue while the sending is still transmitting and
incorrectly report RX errors, with a wrong number of packet received.

Add explicit timeouts to the receiver for both connection activation
(first packet received for UDP) and reception completion, so that
in the above critical scenario the receiver will wait for the
transfer completion.

Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO")
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
