<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/verifier/ref_tracking.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-19T01:45:35Z</updated>
<entry>
<title>selftests/bpf: Mark tests that require unaligned memory access</title>
<updated>2020-11-19T01:45:35Z</updated>
<author>
<name>Björn Töpel</name>
</author>
<published>2020-11-18T07:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6007b23cc7555df882be870433dc589841d4eb06'/>
<id>urn:sha1:6007b23cc7555df882be870433dc589841d4eb06</id>
<content type='text'>
A lot of tests require unaligned memory access to work. Mark the tests
as such, so that they can be avoided on unsupported architectures such
as RISC-V.

Signed-off-by: Björn Töpel &lt;bjorn.topel@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Luke Nelson &lt;luke.r.nels@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20201118071640.83773-4-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>bpf: selftest: Add ref_tracking verifier test for bpf_skc casting</title>
<updated>2020-09-25T20:58:02Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2020-09-25T00:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d13746dd8359e1d0b354b557ebb36e8e1939a6c'/>
<id>urn:sha1:5d13746dd8359e1d0b354b557ebb36e8e1939a6c</id>
<content type='text'>
The patch tests for:
1. bpf_sk_release() can be called on a tcp_sock btf_id ptr.

2. Ensure the tcp_sock btf_id pointer cannot be used
   after bpf_sk_release().

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Lorenz Bauer &lt;lmb@cloudflare.com&gt;
Link: https://lore.kernel.org/bpf/20200925000421.3857616-1-kafai@fb.com
</content>
</entry>
<entry>
<title>bpf: Selftests, verifier case for non null pointer check branch taken</title>
<updated>2020-05-22T00:44:25Z</updated>
<author>
<name>John Fastabend</name>
</author>
<published>2020-05-21T20:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c72b5cbb09bd76634b8d19695db2219964e24128'/>
<id>urn:sha1:c72b5cbb09bd76634b8d19695db2219964e24128</id>
<content type='text'>
When we have pointer type that is known to be non-null and comparing
against zero we only follow the non-null branch. This adds tests to
cover this case for reference tracking. Also add the other case when
comparison against a non-zero value and ensure we still fail with
unreleased reference.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/159009166599.6313.1593680633787453767.stgit@john-Precision-5820-Tower
</content>
</entry>
<entry>
<title>bpf: Add further test_verifier cases for record_func_key</title>
<updated>2019-12-19T21:39:22Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2019-12-19T21:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3123d8018d4686cf193806c4e27a9853550ed895'/>
<id>urn:sha1:3123d8018d4686cf193806c4e27a9853550ed895</id>
<content type='text'>
Expand dummy prog generation such that we can easily check on return
codes and add few more test cases to make sure we keep on tracking
pruning behavior.

  # ./test_verifier
  [...]
  #1066/p XDP pkt read, pkt_data &lt;= pkt_meta', bad access 1 OK
  #1067/p XDP pkt read, pkt_data &lt;= pkt_meta', bad access 2 OK
  Summary: 1580 PASSED, 0 SKIPPED, 0 FAILED

Also verified that JIT dump of added test cases looks good.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/df7200b6021444fd369376d227de917357285b65.1576789878.git.daniel@iogearbox.net
</content>
</entry>
<entry>
<title>selftests/bpf: test references to sock_common</title>
<updated>2019-03-22T01:59:11Z</updated>
<author>
<name>Lorenz Bauer</name>
</author>
<published>2019-03-22T01:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5792d52df1e77110abf0d11b1131992a8c0c8d17'/>
<id>urn:sha1:5792d52df1e77110abf0d11b1131992a8c0c8d17</id>
<content type='text'>
Make sure that returning a struct sock_common * reference invokes
the reference tracking machinery in the verifier.

Signed-off-by: Lorenz Bauer &lt;lmb@cloudflare.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: allow specifying helper for BPF_SK_LOOKUP</title>
<updated>2019-03-22T01:59:11Z</updated>
<author>
<name>Lorenz Bauer</name>
</author>
<published>2019-03-22T01:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dbaf2877e9ad0ac77c463d1bf87b2eb7efc46160'/>
<id>urn:sha1:dbaf2877e9ad0ac77c463d1bf87b2eb7efc46160</id>
<content type='text'>
Make the BPF_SK_LOOKUP macro take a helper function, to ease
writing tests for new helpers.

Signed-off-by: Lorenz Bauer &lt;lmb@cloudflare.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: Test ref release issue in bpf_tcp_sock and bpf_sk_fullsock</title>
<updated>2019-03-13T19:04:35Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2019-03-12T17:23:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b55aa7b04bb42274b4a894020b5b2fa059c3527e'/>
<id>urn:sha1:b55aa7b04bb42274b4a894020b5b2fa059c3527e</id>
<content type='text'>
Adding verifier tests to ensure the ptr returned from bpf_tcp_sock() and
bpf_sk_fullsock() cannot be accessed after bpf_sk_release() is called.
A few of the tests are derived from a reproducer test by Lorenz Bauer.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: Add skb-&gt;sk, bpf_sk_fullsock and bpf_tcp_sock tests to test_verifer</title>
<updated>2019-02-11T03:46:17Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2019-02-10T07:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb47d1d931f8419645db15ef5fc0dc7a857c8f4e'/>
<id>urn:sha1:fb47d1d931f8419645db15ef5fc0dc7a857c8f4e</id>
<content type='text'>
This patch tests accessing the skb-&gt;sk and the new helpers,
bpf_sk_fullsock and bpf_tcp_sock.

The errstr of some existing "reference tracking" tests is changed
with s/bpf_sock/sock/ and s/socket/sock/ where "sock" is from the
verifier's reg_type_str[].

Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: break up the rest of test_verifier</title>
<updated>2019-01-28T05:37:45Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2019-01-25T23:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48729226238d4d56bdb8de9d54b911f179dd54b7'/>
<id>urn:sha1:48729226238d4d56bdb8de9d54b911f179dd54b7</id>
<content type='text'>
Break up the rest of test_verifier tests into separate
files.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Acked-by: Jiong Wang &lt;jiong.wang@netronome.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
