<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/Makefile, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-05-14T08:50:01Z</updated>
<entry>
<title>selftests/bpf: Re-generate vmlinux.h and BPF skeletons if bpftool changed</title>
<updated>2021-05-14T08:50:01Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2021-03-18T19:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=590c62890cfbf1f54db8ec6775ab37264884f203'/>
<id>urn:sha1:590c62890cfbf1f54db8ec6775ab37264884f203</id>
<content type='text'>
[ Upstream commit cab62c37be057379a2a17b1b2eacd9dcba1e14dc ]

Trigger vmlinux.h and BPF skeletons re-generation if detected that bpftool was
re-compiled. Otherwise full `make clean` is required to get updated skeletons,
if bpftool is modified.

Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls")
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210318194036.3521577-11-andrii@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Clarify build error if no vmlinux</title>
<updated>2020-12-16T18:04:34Z</updated>
<author>
<name>Kamal Mostafa</name>
</author>
<published>2020-12-15T18:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a3449c19407a28f7019a887cdf0d6ba2444751a'/>
<id>urn:sha1:1a3449c19407a28f7019a887cdf0d6ba2444751a</id>
<content type='text'>
If Makefile cannot find any of the vmlinux's in its VMLINUX_BTF_PATHS list,
it tries to run btftool incorrectly, with VMLINUX_BTF unset:

    bpftool btf dump file $(VMLINUX_BTF) format c

Such that the keyword 'format' is misinterpreted as the path to vmlinux.
The resulting build error message is fairly cryptic:

      GEN      vmlinux.h
    Error: failed to load BTF from format: No such file or directory

This patch makes the failure reason clearer by yielding this instead:

    Makefile:...: *** Cannot find a vmlinux for VMLINUX_BTF at any of
    "{paths}".  Stop.

Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls")
Signed-off-by: Kamal Mostafa &lt;kamal@canonical.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201215182011.15755-1-kamal@canonical.com
</content>
</entry>
<entry>
<title>selftests/bpf: Drop the need for LLVM's llc</title>
<updated>2020-12-11T05:33:27Z</updated>
<author>
<name>Andrew Delgadillo</name>
</author>
<published>2020-12-11T00:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89ad7420b25c2b40a4d916f4fd43b9ccacd50500'/>
<id>urn:sha1:89ad7420b25c2b40a4d916f4fd43b9ccacd50500</id>
<content type='text'>
LLC is meant for compiler development and debugging. Consequently, it
exposes many low level options about its backend. To avoid future bugs
introduced by using the raw LLC tool, use clang directly so that all
appropriate options are passed to the back end.

Additionally, simplify the Makefile by removing the
CLANG_NATIVE_BPF_BUILD_RULE as it is not being use, stop passing
dwarfris attr since elfutils/libdw now supports the bpf backend (which
should work with any recent pahole), and stop passing alu32 since
-mcpu=v3 implies alu32.

Signed-off-by: Andrew Delgadillo &lt;adelg@google.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20201211004344.3355074-1-adelg@google.com
</content>
</entry>
<entry>
<title>selftests/bpf: fix bpf_testmod.ko recompilation logic</title>
<updated>2020-12-11T05:16:29Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2020-12-11T01:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a67079b03165a17f9aceab3dd26b1638af68e0fc'/>
<id>urn:sha1:a67079b03165a17f9aceab3dd26b1638af68e0fc</id>
<content type='text'>
bpf_testmod.ko build rule declared dependency on VMLINUX_BTF, but the variable
itself was initialized after the rule was declared, which often caused
bpf_testmod.ko to not be re-compiled. Fix by moving VMLINUX_BTF determination
sooner.

Also enforce bpf_testmod.ko recompilation when we detect that vmlinux image
changed by removing bpf_testmod/bpf_testmod.ko. This is necessary to generate
correct module's split BTF. Without it, Kbuild's module build logic might
determine that nothing changed on the kernel side and thus bpf_testmod.ko
shouldn't be rebuilt, so won't re-generate module BTF, which often leads to
module's BTF with wrong string offsets against vmlinux BTF. Removing .ko file
forces Kbuild to re-build the module.

Reported-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Fixes: 9f7fa225894c ("selftests/bpf: Add bpf_testmod kernel module for testing")
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/r/20201211015946.4062098-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Drop tcp-{client,server}.py from Makefile</title>
<updated>2020-12-10T15:43:41Z</updated>
<author>
<name>Veronika Kabatova</name>
</author>
<published>2020-12-10T12:01:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5b7b1194a57bc59f289f3e4433a1be81cc3e19d'/>
<id>urn:sha1:a5b7b1194a57bc59f289f3e4433a1be81cc3e19d</id>
<content type='text'>
The files don't exist anymore so this breaks generic kselftest builds
when using "make install" or "make gen_tar".

Fixes: 247f0ec361b7 ("selftests/bpf: Drop python client/server in favor of threads")
Signed-off-by: Veronika Kabatova &lt;vkabatov@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20201210120134.2148482-1-vkabatov@redhat.com
</content>
</entry>
<entry>
<title>selftests/bpf: Xsk selftests - SKB POLL, NOPOLL</title>
<updated>2020-12-09T15:44:45Z</updated>
<author>
<name>Weqaar Janjua</name>
</author>
<published>2020-12-07T21:53:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=facb7cb2e909ad2d21ebbfdc051726d4cd8f1d35'/>
<id>urn:sha1:facb7cb2e909ad2d21ebbfdc051726d4cd8f1d35</id>
<content type='text'>
Adds following tests:

1. AF_XDP SKB mode
   Generic mode XDP is driver independent, used when the driver does
   not have support for XDP. Works on any netdevice using sockets and
   generic XDP path. XDP hook from netif_receive_skb().
   a. nopoll - soft-irq processing
   b. poll - using poll() syscall

Signed-off-by: Weqaar Janjua &lt;weqaar.a.janjua@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Tested-by: Yonghong Song &lt;yhs@fb.com&gt;
Acked-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201207215333.11586-3-weqaar.a.janjua@intel.com
</content>
</entry>
<entry>
<title>selftests/bpf: Xsk selftests framework</title>
<updated>2020-12-09T15:44:44Z</updated>
<author>
<name>Weqaar Janjua</name>
</author>
<published>2020-12-07T21:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a89052572ebbf4bcee7c39390640e92b60eaa653'/>
<id>urn:sha1:a89052572ebbf4bcee7c39390640e92b60eaa653</id>
<content type='text'>
This patch adds AF_XDP selftests framework under selftests/bpf.

Topology:
---------
     -----------           -----------
     |  xskX   | --------- |  xskY   |
     -----------     |     -----------
          |          |          |
     -----------     |     ----------
     |  vethX  | --------- |  vethY |
     -----------   peer    ----------
          |          |          |
     namespaceX      |     namespaceY

Prerequisites setup by script test_xsk.sh:

   Set up veth interfaces as per the topology shown ^^:
   * setup two veth interfaces and one namespace
   ** veth&lt;xxxx&gt; in root namespace
   ** veth&lt;yyyy&gt; in af_xdp&lt;xxxx&gt; namespace
   ** namespace af_xdp&lt;xxxx&gt;
   * create a spec file veth.spec that includes this run-time configuration
   *** xxxx and yyyy are randomly generated 4 digit numbers used to avoid
       conflict with any existing interface
   * tests the veth and xsk layers of the topology

Signed-off-by: Weqaar Janjua &lt;weqaar.a.janjua@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Tested-by: Yonghong Song &lt;yhs@fb.com&gt;
Acked-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201207215333.11586-2-weqaar.a.janjua@intel.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add bpf_testmod kernel module for testing</title>
<updated>2020-12-04T01:38:20Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2020-12-03T20:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f7fa225894c7fcb014f3699a402fcc4d896cb1c'/>
<id>urn:sha1:9f7fa225894c7fcb014f3699a402fcc4d896cb1c</id>
<content type='text'>
Add bpf_testmod module, which is conceptually out-of-tree module and provides
ways for selftests/bpf to test various kernel module-related functionality:
raw tracepoint, fentry/fexit/fmod_ret, etc. This module will be auto-loaded by
test_progs test runner and expected by some of selftests to be present and
loaded.

Pahole currently isn't able to generate BTF for static functions in kernel
modules, so make sure traced function is global.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/20201203204634.1325171-7-andrii@kernel.org
</content>
</entry>
<entry>
<title>bpf: Fix cold build of test_progs-no_alu32</title>
<updated>2020-12-03T20:10:53Z</updated>
<author>
<name>Brendan Jackman</name>
</author>
<published>2020-12-03T12:08:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58c185b85d0c1753b0b6a9390294bd883faf4d77'/>
<id>urn:sha1:58c185b85d0c1753b0b6a9390294bd883faf4d77</id>
<content type='text'>
This object lives inside the trunner output dir,
i.e. tools/testing/selftests/bpf/no_alu32/btf_data.o

At some point it gets copied into the parent directory during another
part of the build, but that doesn't happen when building
test_progs-no_alu32 from clean.

Signed-off-by: Brendan Jackman &lt;jackmanb@google.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/bpf/20201203120850.859170-1-jackmanb@google.com
</content>
</entry>
<entry>
<title>selftests/bpf: Fix flavored variants of test_ima</title>
<updated>2020-11-30T21:56:32Z</updated>
<author>
<name>KP Singh</name>
</author>
<published>2020-11-26T18:49:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=854055c0cf30d732b3514ce7956976f60496b1a1'/>
<id>urn:sha1:854055c0cf30d732b3514ce7956976f60496b1a1</id>
<content type='text'>
Flavored variants of test_progs (e.g. test_progs-no_alu32) change their
working directory to the corresponding subdirectory (e.g. no_alu32).
Since the setup script required by test_ima (ima_setup.sh) is not
mentioned in the dependencies, it does not get copied to these
subdirectories and causes flavored variants of test_ima to fail.

Adding the script to TRUNNER_EXTRA_FILES ensures that the file is also
copied to the subdirectories for the flavored variants of test_progs.

Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash")
Reported-by: Yonghong Song &lt;yhs@fb.com&gt;
Suggested-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20201126184946.1708213-1-kpsingh@chromium.org
</content>
</entry>
</feed>
