<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/tools/testing/selftests/bpf/prog_tests, branch vm-bind</title>
<subtitle>Linux Kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/linux.git/atom?h=vm-bind</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/linux.git/atom?h=vm-bind'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/'/>
<updated>2022-06-24T18:21:50+00:00</updated>
<entry>
<title>selftests/bpf: Test sockmap update when socket has ULP</title>
<updated>2022-06-24T18:21:50+00:00</updated>
<author>
<name>Jakub Sitnicki</name>
<email>jakub@cloudflare.com</email>
</author>
<published>2022-06-23T09:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=935336c191040809bf5739654ea337c13fe8f9af'/>
<id>urn:sha1:935336c191040809bf5739654ea337c13fe8f9af</id>
<content type='text'>
Cover the scenario when we cannot insert a socket into the sockmap, because
it has it is using ULP. Failed insert should not have any effect on the ULP
state. This is a regression test.

Signed-off-by: Jakub Sitnicki &lt;jakub@cloudflare.com&gt;
Link: https://lore.kernel.org/r/20220623091231.417138-1-jakub@cloudflare.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftest/bpf: Fix kprobe_multi bench test</title>
<updated>2022-06-17T02:42:21+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2022-06-15T11:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=730067022c0137691b27726377c2d088f7f8e33c'/>
<id>urn:sha1:730067022c0137691b27726377c2d088f7f8e33c</id>
<content type='text'>
With [1] the available_filter_functions file contains records
starting with __ftrace_invalid_address___ and marking disabled
entries.

We need to filter them out for the bench test to pass only
resolvable symbols to kernel.

[1] commit b39181f7c690 ("ftrace: Add FTRACE_MCOUNT_MAX_OFFSET to avoid adding weak function")

Fixes: b39181f7c690 ("ftrace: Add FTRACE_MCOUNT_MAX_OFFSET to avoid adding weak function")
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Link: https://lore.kernel.org/r/20220615112118.497303-5-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Shuffle cookies symbols in kprobe multi test</title>
<updated>2022-06-17T02:42:21+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2022-06-15T11:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=ad8848535e97f4a5374fc68f7a5d16e2565940cc'/>
<id>urn:sha1:ad8848535e97f4a5374fc68f7a5d16e2565940cc</id>
<content type='text'>
There's a kernel bug that causes cookies to be misplaced and
the reason we did not catch this with this test is that we
provide bpf_fentry_test* functions already sorted by name.

Shuffling function bpf_fentry_test2 deeper in the list and
keeping the current cookie values as before will trigger
the bug.

The kernel fix is coming in following changes.

Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Link: https://lore.kernel.org/r/20220615112118.497303-2-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Test tail call counting with bpf2bpf and data on stack</title>
<updated>2022-06-16T19:49:05+00:00</updated>
<author>
<name>Jakub Sitnicki</name>
<email>jakub@cloudflare.com</email>
</author>
<published>2022-06-16T16:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=5e0b0a4c52d30bb09659446f40b77a692361600d'/>
<id>urn:sha1:5e0b0a4c52d30bb09659446f40b77a692361600d</id>
<content type='text'>
Cover the case when tail call count needs to be passed from BPF function to
BPF function, and the caller has data on stack. Specifically when the size
of data allocated on BPF stack is not a multiple on 8.

Signed-off-by: Jakub Sitnicki &lt;jakub@cloudflare.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20220616162037.535469-3-jakub@cloudflare.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add selftest for calling global functions from freplace</title>
<updated>2022-06-07T17:41:20+00:00</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2022-06-06T07:52:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=2cf7b7ffdae519b284f1406012b52e2282fa36bf'/>
<id>urn:sha1:2cf7b7ffdae519b284f1406012b52e2282fa36bf</id>
<content type='text'>
Add a selftest that calls a global function with a context object parameter
from an freplace function to check that the program context type is
correctly converted to the freplace target when fetching the context type
from the kernel BTF.

v2:
- Trim includes
- Get rid of global function
- Use __noinline

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/r/20220606075253.28422-2-toke@redhat.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Dynptr tests</title>
<updated>2022-05-23T21:31:29+00:00</updated>
<author>
<name>Joanne Koong</name>
<email>joannelkoong@gmail.com</email>
</author>
<published>2022-05-23T21:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=0cf7052a55128f7fd7905f6ae6eb995d6db76b52'/>
<id>urn:sha1:0cf7052a55128f7fd7905f6ae6eb995d6db76b52</id>
<content type='text'>
This patch adds tests for dynptrs, which include cases that the
verifier needs to reject (for example, a bpf_ringbuf_reserve_dynptr
without a corresponding bpf_ringbuf_submit/discard_dynptr) as well
as cases that should successfully pass.

Signed-off-by: Joanne Koong &lt;joannelkoong@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220523210712.3641569-7-joannelkoong@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Fix spelling mistake: "unpriviliged" -&gt; "unprivileged"</title>
<updated>2022-05-23T19:59:57+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-05-23T11:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=f9a3eca4bc0452a7079282d1ad87d65cb3463f0a'/>
<id>urn:sha1:f9a3eca4bc0452a7079282d1ad87d65cb3463f0a</id>
<content type='text'>
There are spelling mistakes in ASSERT messages. Fix these.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20220523115604.49942-1-colin.i.king@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: add tests verifying unprivileged bpf behaviour</title>
<updated>2022-05-21T02:54:34+00:00</updated>
<author>
<name>Alan Maguire</name>
<email>alan.maguire@oracle.com</email>
</author>
<published>2022-05-19T14:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=90a039fd19fc35d03a74ce2973992c878546cb20'/>
<id>urn:sha1:90a039fd19fc35d03a74ce2973992c878546cb20</id>
<content type='text'>
tests load/attach bpf prog with maps, perfbuf and ringbuf, pinning
them.  Then effective caps are dropped and we verify we can

- pick up the pin
- create ringbuf/perfbuf
- get ringbuf/perfbuf events, carry out map update, lookup and delete
- create a link

Negative testing also ensures

- BPF prog load fails
- BPF map create fails
- get fd by id fails
- get next id fails
- query fails
- BTF load fails

Signed-off-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/r/1652970334-30510-3-git-send-email-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Add missing trampoline program type to trampoline_count test</title>
<updated>2022-05-20T23:12:14+00:00</updated>
<author>
<name>Yuntao Wang</name>
<email>ytcoode@gmail.com</email>
</author>
<published>2022-05-19T15:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=b23316aabffa835ecc516cb81daeef5b9155e8a5'/>
<id>urn:sha1:b23316aabffa835ecc516cb81daeef5b9155e8a5</id>
<content type='text'>
Currently the trampoline_count test doesn't include any fmod_ret bpf
programs, fix it to make the test cover all possible trampoline program
types.

Since fmod_ret bpf programs can't be attached to __set_task_comm function,
as it's neither whitelisted for error injection nor a security hook, change
it to bpf_modify_return_test.

This patch also does some other cleanups such as removing duplicate code,
dropping inconsistent comments, etc.

Signed-off-by: Yuntao Wang &lt;ytcoode@gmail.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/20220519150610.601313-1-ytcoode@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Verify first of struct mptcp_sock</title>
<updated>2022-05-20T22:36:48+00:00</updated>
<author>
<name>Geliang Tang</name>
<email>geliang.tang@suse.com</email>
</author>
<published>2022-05-19T23:30:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=4f90d034bba9bdcb06a3cb53c43012351c1b39ff'/>
<id>urn:sha1:4f90d034bba9bdcb06a3cb53c43012351c1b39ff</id>
<content type='text'>
This patch verifies the 'first' struct member of struct mptcp_sock, which
points to the first subflow of msk. Save 'sk' in mptcp_storage, and verify
it with 'first' in verify_msk().

v5:
 - Use ASSERT_EQ() instead of a manual comparison + log (Andrii).

Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Link: https://lore.kernel.org/bpf/20220519233016.105670-8-mathew.j.martineau@linux.intel.com
</content>
</entry>
</feed>
