<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/Makefile, branch linux-6.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-10-15T10:04:14Z</updated>
<entry>
<title>selftests/bpf: Fix typos and grammar in test sources</title>
<updated>2025-10-15T10:04:14Z</updated>
<author>
<name>Shubham Sharma</name>
</author>
<published>2025-08-26T12:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=deaffa5e62eb25a827d45f625488301e38d23b72'/>
<id>urn:sha1:deaffa5e62eb25a827d45f625488301e38d23b72</id>
<content type='text'>
[ Upstream commit d3abefe897408718799ae3bd06295b89b870a38e ]

Fix spelling typos and grammar errors in BPF selftests source code.

Signed-off-by: Shubham Sharma &lt;slopixelz@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250826125746.17983-1-slopixelz@gmail.com
Stable-dep-of: 0c342bfc9949 ("selftests/bpf: Fix realloc size in bpf_get_addrs")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Copy test_kmods when installing selftest</title>
<updated>2025-10-15T10:03:18Z</updated>
<author>
<name>Amery Hung</name>
</author>
<published>2025-08-12T17:50:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b39970581c6b0a7ad72b19307769b7cf3c2ee932'/>
<id>urn:sha1:b39970581c6b0a7ad72b19307769b7cf3c2ee932</id>
<content type='text'>
[ Upstream commit 07866544e410e4c895a729971e4164861b41fad5 ]

Commit d6212d82bf26 ("selftests/bpf: Consolidate kernel modules into
common directory") consolidated the Makefile of test_kmods. However,
since it removed test_kmods from TEST_GEN_PROGS_EXTENDED, the kernel
modules required by bpf selftests are now missing from kselftest_install
when "make install". Fix it by adding test_kmod to TEST_GEN_FILES.

Fixes: d6212d82bf26 ("selftests/bpf: Consolidate kernel modules into common directory")
Signed-off-by: Amery Hung &lt;ameryhung@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250812175039.2323570-1-ameryhung@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf after rc3</title>
<updated>2025-06-26T16:49:39Z</updated>
<author>
<name>Alexei Starovoitov</name>
</author>
<published>2025-06-26T16:48:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=886178a33a30fe685e926d84f531243982fb3c70'/>
<id>urn:sha1:886178a33a30fe685e926d84f531243982fb3c70</id>
<content type='text'>
Cross-merge BPF, perf and other fixes after downstream PRs.
It restores BPF CI to green after critical fix
commit bc4394e5e79c ("perf: Fix the throttle error of some clock events")

No conflicts.

Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Convert test_sysctl to prog_tests</title>
<updated>2025-06-24T04:50:44Z</updated>
<author>
<name>Jerome Marchand</name>
</author>
<published>2025-06-19T14:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8a205486ed5c0c5c0386e472157a81ce686af25'/>
<id>urn:sha1:b8a205486ed5c0c5c0386e472157a81ce686af25</id>
<content type='text'>
Convert test_sysctl test to prog_tests with minimal change to the
tests themselves.

Signed-off-by: Jerome Marchand &lt;jmarchan@redhat.com&gt;
Acked-by: Yonghong Song &lt;yonghong.song@linux.dev&gt;
Link: https://lore.kernel.org/r/20250619140603.148942-3-jmarchan@redhat.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

</content>
</entry>
<entry>
<title>selftests/bpf: Add test for bpftool access to read-only protected maps</title>
<updated>2025-06-20T18:13:03Z</updated>
<author>
<name>Slava Imameev</name>
</author>
<published>2025-06-20T15:18:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8b19aeca1652fcadefce8529cd85e5fd475dd69'/>
<id>urn:sha1:f8b19aeca1652fcadefce8529cd85e5fd475dd69</id>
<content type='text'>
Add selftest cases that validate bpftool's expected behavior when
accessing maps protected from modification via security_bpf_map.

The test includes a BPF program attached to security_bpf_map with two maps:
- A protected map that only allows read-only access
- An unprotected map that allows full access

The test script attaches the BPF program to security_bpf_map and
verifies that for the bpftool map command:
- Read access works on both maps
- Write access fails on the protected map
- Write access succeeds on the unprotected map
- These behaviors remain consistent when the maps are pinned

Signed-off-by: Slava Imameev &lt;slava.imameev@crowdstrike.com&gt;
Reviewed-by: Quentin Monnet &lt;qmo@kernel.org&gt;
Link: https://lore.kernel.org/r/20250620151812.13952-2-slava.imameev@crowdstrike.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>veristat: Memory accounting for bpf programs</title>
<updated>2025-06-13T17:44:12Z</updated>
<author>
<name>Eduard Zingerman</name>
</author>
<published>2025-06-13T07:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67cdcc405b46c13446d6d220a108daa2f8de3436'/>
<id>urn:sha1:67cdcc405b46c13446d6d220a108daa2f8de3436</id>
<content type='text'>
This commit adds a new field mem_peak / "Peak memory (MiB)" field to a
set of gathered statistics. The field is intended as an estimate for
peak verifier memory consumption for processing of a given program.

Mechanically stat is collected as follows:
- At the beginning of handle_verif_mode() a new cgroup is created
  and veristat process is moved into this cgroup.
- At each program load:
  - bpf_object__load() is split into bpf_object__prepare() and
    bpf_object__load() to avoid accounting for memory allocated for
    maps;
  - before bpf_object__load():
    - a write to "memory.peak" file of the new cgroup is used to reset
      cgroup statistics;
    - updated value is read from "memory.peak" file and stashed;
  - after bpf_object__load() "memory.peak" is read again and
    difference between new and stashed values is used as a metric.

If any of the above steps fails veristat proceeds w/o collecting
mem_peak information for a program, reporting mem_peak as -1.

While memcg provides data in bytes (converted from pages), veristat
converts it to megabytes to avoid jitter when comparing results of
different executions.

The change has no measurable impact on veristat running time.

A correlation between "Peak states" and "Peak memory" fields provides
a sanity check for gathered statistics, e.g. a sample of data for
sched_ext programs:

Program                   Peak states  Peak memory (MiB)
------------------------  -----------  -----------------
lavd_select_cpu                  2153                 44
lavd_enqueue                     1982                 41
lavd_dispatch                    3480                 28
layered_dispatch                 1417                 17
layered_enqueue                   760                 11
lavd_cpu_offline                  349                  6
lavd_cpu_online                   349                  6
lavd_init                         394                  6
rusty_init                        350                  5
layered_select_cpu                391                  4
...
rusty_stopping                    134                  1
arena_topology_node_init          170                  0

Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250613072147.3938139-3-eddyz87@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add SKIP_LLVM makefile variable</title>
<updated>2025-05-22T16:31:03Z</updated>
<author>
<name>Mykyta Yatsenko</name>
</author>
<published>2025-05-22T01:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ead949920c773d4c3a42988391c2e6d0f32650f'/>
<id>urn:sha1:5ead949920c773d4c3a42988391c2e6d0f32650f</id>
<content type='text'>
Introduce SKIP_LLVM makefile variable that allows to avoid using llvm
dependencies when building BPF selftests. This is different from
existing feature-llvm, as the latter is a result of automatic detection
and should not be set by user explicitly.
Avoiding llvm dependencies could be useful for environments that do not
have them, given that as of now llvm dependencies are required only by
jit_disasm_helpers.c.

Signed-off-by: Mykyta Yatsenko &lt;yatsenko@meta.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250522013813.125428-1-mykyta.yatsenko5@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Remove unnecessary link dependencies</title>
<updated>2025-05-19T16:30:38Z</updated>
<author>
<name>Mykyta Yatsenko</name>
</author>
<published>2025-05-16T19:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b615ce5fbefb7d9bd1739b0aee54825349ae7438'/>
<id>urn:sha1:b615ce5fbefb7d9bd1739b0aee54825349ae7438</id>
<content type='text'>
Remove llvm dependencies from binaries that do not use llvm libraries.
Filter out libxml2 from llvm dependencies, as it seems that
it is not actually used. This patch reduced link dependencies
for BPF selftests.
The next line was adding llvm dependencies to every target in the
makefile, while the only targets that require those are test
runnners (test_progs, test_progs-no_alu32,...):
```
$(OUTPUT)/$(TRUNNER_BINARY): LDLIBS += $$(LLVM_LDLIBS)
```

Before this change:
ldd linux/tools/testing/selftests/bpf/veristat
    linux-vdso.so.1 (0x00007ffd2c3fd000)
    libelf.so.1 =&gt; /lib64/libelf.so.1 (0x00007fe1dcf89000)
    libz.so.1 =&gt; /lib64/libz.so.1 (0x00007fe1dcf6f000)
    libm.so.6 =&gt; /lib64/libm.so.6 (0x00007fe1dce94000)
    libzstd.so.1 =&gt; /lib64/libzstd.so.1 (0x00007fe1dcddd000)
    libxml2.so.2 =&gt; /lib64/libxml2.so.2 (0x00007fe1dcc54000)
    libstdc++.so.6 =&gt; /lib64/libstdc++.so.6 (0x00007fe1dca00000)
    libc.so.6 =&gt; /lib64/libc.so.6 (0x00007fe1dc600000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fe1dcfb1000)
    liblzma.so.5 =&gt; /lib64/liblzma.so.5 (0x00007fe1dc9d4000)
    libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x00007fe1dcc38000)

After:
ldd linux/tools/testing/selftests/bpf/veristat
    linux-vdso.so.1 (0x00007ffc83370000)
    libelf.so.1 =&gt; /lib64/libelf.so.1 (0x00007f4b87515000)
    libz.so.1 =&gt; /lib64/libz.so.1 (0x00007f4b874fb000)
    libc.so.6 =&gt; /lib64/libc.so.6 (0x00007f4b87200000)
    libzstd.so.1 =&gt; /lib64/libzstd.so.1 (0x00007f4b87444000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4b8753d000)

Signed-off-by: Mykyta Yatsenko &lt;yatsenko@meta.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250516195522.311769-1-mykyta.yatsenko5@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Allow skipping docs compilation</title>
<updated>2025-05-12T22:18:46Z</updated>
<author>
<name>Mykyta Yatsenko</name>
</author>
<published>2025-05-10T00:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a320ed325488d07081461663ac9243293006080'/>
<id>urn:sha1:3a320ed325488d07081461663ac9243293006080</id>
<content type='text'>
Currently rst2man is required to build bpf selftests, as the tool is
used by Makefile.docs. rst2man may be missing in some build
environments and is not essential for selftests. It makes sense to
allow user to skip building docs.

This patch adds SKIP_DOCS variable into bpf selftests Makefile that when
set to 1 allows skipping building docs, for example:
make -C tools/testing/selftests TARGETS=bpf SKIP_DOCS=1

Signed-off-by: Mykyta Yatsenko &lt;yatsenko@meta.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250510002450.365613-1-mykyta.yatsenko5@gmail.com
</content>
</entry>
<entry>
<title>selftest/bpf/benchs: Add benchmark for sockmap usage</title>
<updated>2025-04-10T02:59:00Z</updated>
<author>
<name>Jiayuan Chen</name>
</author>
<published>2025-04-07T14:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b2fa44de5e718a3053dea37e4a3d893b0f40e42'/>
<id>urn:sha1:7b2fa44de5e718a3053dea37e4a3d893b0f40e42</id>
<content type='text'>
Add TCP+sockmap-based benchmark.
Since sockmap's own update and delete operations are generally less
critical, the performance of the fast forwarding framework built upon
it is the key aspect.

Also with cgset/cgexec, we can observe the behavior of sockmap under
memory pressure.

The benchmark can be run with:
'''
./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress
'''

In the future, we plan to move socket_helpers.h out of the prog_tests
directory to make it accessible for the benchmark. This will enable
better support for various socket types.

Signed-off-by: Jiayuan Chen &lt;jiayuan.chen@linux.dev&gt;
Link: https://lore.kernel.org/r/20250407142234.47591-5-jiayuan.chen@linux.dev
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
