<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/net, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-04-20T19:39:19+00:00</updated>
<entry>
<title>selftests/net: Fixes psock_fanout CBPF test case</title>
<updated>2017-04-20T19:39:19+00:00</updated>
<author>
<name>Mike Maloney</name>
<email>maloney@google.com</email>
</author>
<published>2017-04-18T15:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8'/>
<id>urn:sha1:c1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8</id>
<content type='text'>
'psock_fanout' has been failing since commit 4d7b9dc1f36a9 ("tools:
psock_lib: harden socket filter used by psock tests").  That commit
changed the CBPF filter to examine the full ethernet frame, and was
tested on 'psock_tpacket' which uses SOCK_RAW.  But 'psock_fanout' was
also using this same CBPF in two places, for filtering and fanout, on a
SOCK_DGRAM socket.

Change 'psock_fanout' to use SOCK_RAW so that the CBPF program used with
SO_ATTACH_FILTER can examine the entire frame.  Create a new CBPF
program for use with PACKET_FANOUT_DATA which ignores the header, as it
cannot see the ethernet header.

Tested: Ran tools/testing/selftests/net/psock_{fanout,tpacket} 10 times,
and they all passed.

Fixes: 4d7b9dc1f36a9 ("tools: psock_lib: harden socket filter used by psock tests")
Signed-off-by: 'Mike Maloney &lt;maloneykernel@gmail.com&gt;'
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2017-02-25T23:32:53+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-02-25T23:32:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4f3f22eddc982d247ffe2a6690c3e4a5c46dd09'/>
<id>urn:sha1:c4f3f22eddc982d247ffe2a6690c3e4a5c46dd09</id>
<content type='text'>
Pull Kselftest update from Shuah Khan:
 "This update consists of:

   - fixes to several existing tests from Stafford Horne

   - cpufreq tests from Viresh Kumar

   - Selftest build and install fixes from Bamvor Jian Zhang and Michael
     Ellerman

   - Fixes to protection-keys tests from Dave Hansen

   - Warning fixes from Shuah Khan"

* tag 'linux-kselftest-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (28 commits)
  selftests/powerpc: Fix remaining fallout from recent changes
  selftests/powerpc: Fix the clean rule since recent changes
  selftests: Fix the .S and .S -&gt; .o rules
  selftests: Fix the .c linking rule
  selftests: Fix selftests build to just build, not run tests
  selftests, x86, protection_keys: fix wrong offset in siginfo
  selftests, x86, protection_keys: fix uninitialized variable warning
  selftest: cpufreq: Update MAINTAINERS file
  selftest: cpufreq: Add special tests
  selftest: cpufreq: Add support to test cpufreq modules
  selftest: cpufreq: Add suspend/resume/hibernate support
  selftest: cpufreq: Add support for cpufreq tests
  selftests: Add intel_pstate to TARGETS
  selftests/intel_pstate: Update makefile to match new style
  selftests/intel_pstate: Fix warning on loop index overflow
  cpupower: Restore format of frequency-info limit
  selftests/futex: Add headers to makefile dependencies
  selftests/futex: Add stdio used for logging
  selftests: x86 protection_keys remove dead code
  selftests: x86 protection_keys fix unused variable compile warnings
  ...
</content>
</entry>
<entry>
<title>tools: psock_lib: harden socket filter used by psock tests</title>
<updated>2017-01-12T15:23:26+00:00</updated>
<author>
<name>Sowmini Varadhan</name>
<email>sowmini.varadhan@oracle.com</email>
</author>
<published>2017-01-12T13:10:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d7b9dc1f36a99423a6171d393040165fb135530'/>
<id>urn:sha1:4d7b9dc1f36a99423a6171d393040165fb135530</id>
<content type='text'>
The filter added by sock_setfilter is intended to only permit
packets matching the pattern set up by create_payload(), but
we only check the ip_len, and a single test-character in
the IP packet to ensure this condition.

Harden the filter by adding additional constraints so that we only
permit UDP/IPv4 packets that meet the ip_len and test-character
requirements. Include the bpf_asm src as a comment, in case this
needs to be enhanced in the future

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2017-01-11T19:43:39+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2017-01-11T19:43:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02ac5d1487115d160fab4c3e61b7edc20a945af9'/>
<id>urn:sha1:02ac5d1487115d160fab4c3e61b7edc20a945af9</id>
<content type='text'>
Two AF_* families adding entries to the lockdep tables
at the same time.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: add default rules for c source file</title>
<updated>2017-01-05T20:42:01+00:00</updated>
<author>
<name>bamvor.zhangjian@huawei.com</name>
<email>bamvor.zhangjian@huawei.com</email>
</author>
<published>2016-11-29T11:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d758af257bc40a8a599a0aaa4768b30fb463e9c'/>
<id>urn:sha1:7d758af257bc40a8a599a0aaa4768b30fb463e9c</id>
<content type='text'>
There are difference rules for compiling c source file in different
testcases. In order to enable KBUILD_OUTPUT support in later patch,
this patch introduce the default rules in
"tools/testing/selftest/lib.mk" and remove the existing rules in each
testcase.

Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Bamvor Jian Zhang &lt;bamvor.zhangjian@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: remove duplicated all and clean target</title>
<updated>2017-01-05T20:41:35+00:00</updated>
<author>
<name>bamvor.zhangjian@huawei.com</name>
<email>bamvor.zhangjian@huawei.com</email>
</author>
<published>2016-11-29T11:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88baa78d1f318e57c7cccbfe55d485befd1ce696'/>
<id>urn:sha1:88baa78d1f318e57c7cccbfe55d485befd1ce696</id>
<content type='text'>
Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to
indicate the test program, extended test program and test files. It is
easy to understand the purpose of these files. But mix of compiled and
uncompiled files lead to duplicated "all" and "clean" targets.

In order to remove the duplicated targets, introduce TEST_GEN_PROGS,
TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled
objects.

Also, the later patch will make use of TEST_GEN_XXX to redirect these
files to output directory indicated by KBUILD_OUTPUT or O.

And add this changes to "Contributing new tests(details)" of
Documentation/kselftest.txt.

Signed-off-by: Bamvor Jian Zhang &lt;bamvor.zhangjian@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: do not require bash to run netsocktests testcase</title>
<updated>2017-01-05T20:19:53+00:00</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eb@emlix.com</email>
</author>
<published>2016-12-14T10:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3659f98b5375d195f1870c3e508fe51e52206839'/>
<id>urn:sha1:3659f98b5375d195f1870c3e508fe51e52206839</id>
<content type='text'>
Nothing in this minimal script seems to require bash. We often run these
tests on embedded devices where the only shell available is the busybox
ash. Use sh instead.

Signed-off-by: Rolf Eike Beer &lt;eb@emlix.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>tools: psock_tpacket: block Rx until socket filter has been added and socket has been bound to loopback.</title>
<updated>2017-01-05T20:03:41+00:00</updated>
<author>
<name>Sowmini Varadhan</name>
<email>sowmini.varadhan@oracle.com</email>
</author>
<published>2017-01-05T19:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c1878f7a89efbbe1ac0082d09b2928782a6ceba1'/>
<id>urn:sha1:c1878f7a89efbbe1ac0082d09b2928782a6ceba1</id>
<content type='text'>
Packets from any/all interfaces may be queued up on the PF_PACKET socket
before it is bound to the loopback interface by psock_tpacket, and
when these are passed up by the kernel, they could interfere
with the Rx tests.

Avoid interference from spurious packet by blocking Rx until the
socket filter has been set up, and the packet has been bound to the
desired (lo) interface. The effective sequence is
	socket(PF_PACKET, SOCK_RAW, 0);
	set up ring
	Invoke SO_ATTACH_FILTER
	bind to sll_protocol set to ETH_P_ALL, sll_ifindex for lo
After this sequence, the only packets that will be passed up are
those received on loopback that pass the attached filter.

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tools: test case for TPACKET_V3/TX_RING support</title>
<updated>2017-01-03T16:00:27+00:00</updated>
<author>
<name>Sowmini Varadhan</name>
<email>sowmini.varadhan@oracle.com</email>
</author>
<published>2017-01-03T14:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe878cad38d389cf5dbcce501951b2269d6d02bf'/>
<id>urn:sha1:fe878cad38d389cf5dbcce501951b2269d6d02bf</id>
<content type='text'>
Add a test case and sample code for (TPACKET_V3, PACKET_TX_RING)

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>reuseport, bpf: add test case for bpf_get_numa_node_id</title>
<updated>2016-10-22T21:05:52+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2016-10-21T10:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c2c3c16aaf6a83902beb6063488e2c907de62e9'/>
<id>urn:sha1:3c2c3c16aaf6a83902beb6063488e2c907de62e9</id>
<content type='text'>
The test case is very similar to reuseport_bpf_cpu, only that here
we select socket members based on current numa node id.

  # numactl -H
  available: 2 nodes (0-1)
  node 0 cpus: 0 1 2 3 4 5 12 13 14 15 16 17
  node 0 size: 128867 MB
  node 0 free: 120080 MB
  node 1 cpus: 6 7 8 9 10 11 18 19 20 21 22 23
  node 1 size: 96765 MB
  node 1 free: 87504 MB
  node distances:
  node   0   1
    0:  10  20
    1:  20  10

  # ./reuseport_bpf_numa
  ---- IPv4 UDP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  ---- IPv6 UDP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  ---- IPv4 TCP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  ---- IPv6 TCP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  SUCCESS

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