<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/prog_tests, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-06-09T08:25:30Z</updated>
<entry>
<title>selftests/bpf: Add missing trampoline program type to trampoline_count test</title>
<updated>2022-06-09T08:25:30Z</updated>
<author>
<name>Yuntao Wang</name>
</author>
<published>2022-05-19T15:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7a265470134d6618570f3f4da23fc72daefa0d9'/>
<id>urn:sha1:c7a265470134d6618570f3f4da23fc72daefa0d9</id>
<content type='text'>
[ Upstream commit b23316aabffa835ecc516cb81daeef5b9155e8a5 ]

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
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: Fix bind on used port</title>
<updated>2022-04-08T11:57:56Z</updated>
<author>
<name>Felix Maurer</name>
</author>
<published>2022-01-18T15:11:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb70014b898eb1b093a452659777acb7ecabb71b'/>
<id>urn:sha1:fb70014b898eb1b093a452659777acb7ecabb71b</id>
<content type='text'>
[ Upstream commit 8c0be0631d81e48f77d0ebf0534c86e32bef5f89 ]

The bind_perm BPF selftest failed when port 111/tcp was already in use
during the test. To fix this, the test now runs in its own network name
space.

To use unshare, it is necessary to reorder the includes. The style of
the includes is adapted to be consistent with the other prog_tests.

v2: Replace deprecated CHECK macro with ASSERT_OK

Fixes: 8259fdeb30326 ("selftests/bpf: Verify that rebinding to port &lt; 1024 from BPF works")
Signed-off-by: Felix Maurer &lt;fmaurer@redhat.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Reviewed-by: Jakub Sitnicki &lt;jakub@cloudflare.com&gt;
Link: https://lore.kernel.org/bpf/551ee65533bb987a43f93d88eaf2368b416ccd32.1642518457.git.fmaurer@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Add test for bpf_timer overwriting crash</title>
<updated>2022-02-11T21:13:04Z</updated>
<author>
<name>Kumar Kartikeya Dwivedi</name>
</author>
<published>2022-02-09T07:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7e75016a0753c24d6c995bc02501ae35368e333'/>
<id>urn:sha1:a7e75016a0753c24d6c995bc02501ae35368e333</id>
<content type='text'>
Add a test that validates that timer value is not overwritten when doing
a copy_map_value call in the kernel. Without the prior fix, this test
triggers a crash.

Signed-off-by: Kumar Kartikeya Dwivedi &lt;memxor@gmail.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220209070324.1093182-3-memxor@gmail.com
</content>
</entry>
<entry>
<title>bpf, selftests: Add ringbuf memory type confusion test</title>
<updated>2022-01-19T00:27:03Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2022-01-12T12:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37c8d4807d1b8b521b30310dce97f6695dc2c2c6'/>
<id>urn:sha1:37c8d4807d1b8b521b30310dce97f6695dc2c2c6</id>
<content type='text'>
Add two tests, one which asserts that ring buffer memory can be passed to
other helpers for populating its entry area, and another one where verifier
rejects different type of memory passed to bpf_ringbuf_submit().

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf/selftests: Add check for updating XDP bpf_link with wrong program type</title>
<updated>2022-01-11T17:44:06Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
</author>
<published>2022-01-07T22:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=036a05f50bd777134b1955f400e8d24c0149fef4'/>
<id>urn:sha1:036a05f50bd777134b1955f400e8d24c0149fef4</id>
<content type='text'>
Add a check to the xdp_link selftest that the kernel rejects replacing an
XDP program with a different program type on link update.

v2:
- Split this out into its own patch.

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/r/20220107221115.326171-3-toke@redhat.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf/selftests: convert xdp_link test to ASSERT_* macros</title>
<updated>2022-01-11T17:44:06Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
</author>
<published>2022-01-07T22:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b27480dcaa71e7ee9f56907e419c6a1511fd2b2'/>
<id>urn:sha1:4b27480dcaa71e7ee9f56907e419c6a1511fd2b2</id>
<content type='text'>
Convert the selftest to use the preferred ASSERT_* macros instead of the
deprecated CHECK().

v2:
- Don't add if statements around checks if they weren't there before.

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Link: https://lore.kernel.org/r/20220107221115.326171-2-toke@redhat.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf/selftests: Test bpf_d_path on rdonly_mem.</title>
<updated>2022-01-06T23:20:49Z</updated>
<author>
<name>Hao Luo</name>
</author>
<published>2022-01-06T20:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44bab87d8ca6f0544a9f8fc97bdf33aa5b3c899e'/>
<id>urn:sha1:44bab87d8ca6f0544a9f8fc97bdf33aa5b3c899e</id>
<content type='text'>
The second parameter of bpf_d_path() can only accept writable
memories. Rdonly_mem obtained from bpf_per_cpu_ptr() can not
be passed into bpf_d_path for modification. This patch adds
a selftest to verify this behavior.

Signed-off-by: Hao Luo &lt;haoluo@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/20220106205525.2116218-1-haoluo@google.com
</content>
</entry>
<entry>
<title>bpf/selftests: Fix namespace mount setup in tc_redirect</title>
<updated>2022-01-05T12:35:18Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2022-01-04T12:10:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e22dd18626726028a93ff1350a8a71a00fd843d'/>
<id>urn:sha1:5e22dd18626726028a93ff1350a8a71a00fd843d</id>
<content type='text'>
The tc_redirect umounts /sys in the new namespace, which can be
mounted as shared and cause global umount. The lazy umount also
takes down mounted trees under /sys like debugfs, which won't be
available after sysfs mounts again and could cause fails in other
tests.

  # cat /proc/self/mountinfo | grep debugfs
  34 23 0:7 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime shared:14 - debugfs debugfs rw
  # cat /proc/self/mountinfo | grep sysfs
  23 86 0:22 / /sys rw,nosuid,nodev,noexec,relatime shared:2 - sysfs sysfs rw
  # mount | grep debugfs
  debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)

  # ./test_progs -t tc_redirect
  #164 tc_redirect:OK
  Summary: 1/4 PASSED, 0 SKIPPED, 0 FAILED

  # mount | grep debugfs
  # cat /proc/self/mountinfo | grep debugfs
  # cat /proc/self/mountinfo | grep sysfs
  25 86 0:22 / /sys rw,relatime shared:2 - sysfs sysfs rw

Making the sysfs private under the new namespace so the umount won't
trigger the global sysfs umount.

Reported-by: Hangbin Liu &lt;haliu@redhat.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: Jussi Maki &lt;joamaki@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20220104121030.138216-1-jolsa@kernel.org
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next</title>
<updated>2021-12-31T14:35:40Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2021-12-31T14:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e63a02348958cd7cc8c8401c94de57ad97b5d06c'/>
<id>urn:sha1:e63a02348958cd7cc8c8401c94de57ad97b5d06c</id>
<content type='text'>
Alexei Starovoitov says:

====================
pull-request: bpf-next 2021-12-30

The following pull-request contains BPF updates for your *net-next* tree.

We've added 72 non-merge commits during the last 20 day(s) which contain
a total of 223 files changed, 3510 insertions(+), 1591 deletions(-).

The main changes are:

1) Automatic setrlimit in libbpf when bpf is memcg's in the kernel, from Andrii.

2) Beautify and de-verbose verifier logs, from Christy.

3) Composable verifier types, from Hao.

4) bpf_strncmp helper, from Hou.

5) bpf.h header dependency cleanup, from Jakub.

6) get_func_[arg|ret|arg_cnt] helpers, from Jiri.

7) Sleepable local storage, from KP.

8) Extend kfunc with PTR_TO_CTX, PTR_TO_MEM argument support, from Kumar.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf/selftests: Update local storage selftest for sleepable programs</title>
<updated>2021-12-30T01:54:40Z</updated>
<author>
<name>KP Singh</name>
</author>
<published>2021-12-24T15:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ae6eff2978ee118ce2b536090af0682db13bb83'/>
<id>urn:sha1:0ae6eff2978ee118ce2b536090af0682db13bb83</id>
<content type='text'>
Remove the spin lock logic and update the selftests to use sleepable
programs to use a mix of sleepable and non-sleepable programs. It's more
useful to test the sleepable programs since the tests don't really need
spinlocks.

Signed-off-by: KP Singh &lt;kpsingh@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/20211224152916.1550677-3-kpsingh@kernel.org
</content>
</entry>
</feed>
