<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/prog_tests/snprintf.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-04-11T15:18:09Z</updated>
<entry>
<title>selftests/bpf: Drop duplicate max/min definitions</title>
<updated>2022-04-11T15:18:09Z</updated>
<author>
<name>Geliang Tang</name>
<email>geliang.tang@suse.com</email>
</author>
<published>2022-04-08T23:58:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f4fd706f738338e78f413db36d0a483a11c53cd1'/>
<id>urn:sha1:f4fd706f738338e78f413db36d0a483a11c53cd1</id>
<content type='text'>
Drop duplicate macros min() and MAX() definitions in prog_tests and use
MIN() or MAX() in sys/param.h instead.

Signed-off-by: Geliang Tang &lt;geliang.tang@suse.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/1ae276da9925c2de59b5bdc93b693b4c243e692e.1649462033.git.geliang.tang@suse.com
</content>
</entry>
<entry>
<title>selftests/bpf: Normalize selftest entry points</title>
<updated>2021-10-25T21:45:45Z</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2021-10-22T22:32:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6972dc3b8778ce0d9ce819c6f1e3d32ce2bc3dd9'/>
<id>urn:sha1:6972dc3b8778ce0d9ce819c6f1e3d32ce2bc3dd9</id>
<content type='text'>
Ensure that all test entry points are global void functions with no
input arguments. Mark few subtest entry points as static.

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/20211022223228.99920-2-andrii@kernel.org
</content>
</entry>
<entry>
<title>selftest/bpf: Extend the bpf_snprintf() test for "%c".</title>
<updated>2021-08-15T07:19:10Z</updated>
<author>
<name>Kuniyuki Iwashima</name>
<email>kuniyu@amazon.co.jp</email>
</author>
<published>2021-08-14T01:57:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ce547335d4a42e645320402b24aeadb39531f73c'/>
<id>urn:sha1:ce547335d4a42e645320402b24aeadb39531f73c</id>
<content type='text'>
This patch adds various "positive" patterns for "%c" and two "negative"
patterns for wide character.

Signed-off-by: Kuniyuki Iwashima &lt;kuniyu@amazon.co.jp&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210814015718.42704-5-kuniyu@amazon.co.jp
</content>
</entry>
<entry>
<title>selftests/bpf: Fix the snprintf test</title>
<updated>2021-04-30T17:36:59Z</updated>
<author>
<name>Florent Revest</name>
<email>revest@chromium.org</email>
</author>
<published>2021-04-28T15:25:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f80f88f0e2f2ef9cd805fad1bbf676b0ecd4b55c'/>
<id>urn:sha1:f80f88f0e2f2ef9cd805fad1bbf676b0ecd4b55c</id>
<content type='text'>
The BPF program for the snprintf selftest runs on all syscall entries.
On busy multicore systems this can cause concurrency issues.

For example it was observed that sometimes the userspace part of the
test reads "    4 0000" instead of "    4 000" (extra '0' at the end)
which seems to happen just before snprintf on another core sets
end[-1] = '\0'.

This patch adds a pid filter to the test to ensure that no
bpf_snprintf() will write over the test's output buffers while the
userspace reads the values.

Fixes: c2e39c6bdc7e ("selftests/bpf: Add a series of tests for bpf_snprintf")
Reported-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Florent Revest &lt;revest@chromium.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210428152501.1024509-1-revest@chromium.org
</content>
</entry>
<entry>
<title>selftests/bpf: Add a series of tests for bpf_snprintf</title>
<updated>2021-04-19T22:27:37Z</updated>
<author>
<name>Florent Revest</name>
<email>revest@chromium.org</email>
</author>
<published>2021-04-19T15:52:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c2e39c6bdc7eb48459ec1d34d4f27eb82299f4b7'/>
<id>urn:sha1:c2e39c6bdc7eb48459ec1d34d4f27eb82299f4b7</id>
<content type='text'>
The "positive" part tests all format specifiers when things go well.

The "negative" part makes sure that incorrect format strings fail at
load time.

Signed-off-by: Florent Revest &lt;revest@chromium.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210419155243.1632274-7-revest@chromium.org
</content>
</entry>
</feed>
