<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/verifier/var_off.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-09-30T22:08:05Z</updated>
<entry>
<title>selftests/bpf: Fix spelling mistake "unpriviledged" -&gt; "unprivileged"</title>
<updated>2022-09-30T22:08:05Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-09-28T22:15:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2efcf695bfc0f078dd7d5d23d96a97db34c930d5'/>
<id>urn:sha1:2efcf695bfc0f078dd7d5d23d96a97db34c930d5</id>
<content type='text'>
There are a couple of spelling mistakes, one in a literal string and one
in a comment. Fix them.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20220928221555.67873-1-colin.i.king@gmail.com
</content>
</entry>
<entry>
<title>bpf: Small BPF verifier log improvements</title>
<updated>2022-03-03T15:54:10Z</updated>
<author>
<name>Mykola Lysenko</name>
<email>mykolal@fb.com</email>
</author>
<published>2022-03-01T22:27:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7df5072cc05fd1aab5823bbc465d033cd292fca8'/>
<id>urn:sha1:7df5072cc05fd1aab5823bbc465d033cd292fca8</id>
<content type='text'>
In particular these include:

  1) Remove output of inv for scalars in print_verifier_state
  2) Replace inv with scalar in verifier error messages
  3) Remove _value suffixes for umin/umax/s32_min/etc (except map_value)
  4) Remove output of id=0
  5) Remove output of ref_obj_id=0

Signed-off-by: Mykola Lysenko &lt;mykolal@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220301222745.1667206-1-mykolal@fb.com
</content>
</entry>
<entry>
<title>selftest/bpf: Verifier tests for var-off access</title>
<updated>2021-02-10T18:44:19Z</updated>
<author>
<name>Andrei Matei</name>
<email>andreimatei1@gmail.com</email>
</author>
<published>2021-02-07T01:10:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a22930c4179b51352f2ec9feb35167cbe79afd9'/>
<id>urn:sha1:7a22930c4179b51352f2ec9feb35167cbe79afd9</id>
<content type='text'>
Add tests for the new functionality - reading and writing to the stack
through a variable-offset pointer.

Signed-off-by: Andrei Matei &lt;andreimatei1@gmail.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210207011027.676572-4-andreimatei1@gmail.com
</content>
</entry>
<entry>
<title>selftest/bpf: Adjust expected verifier errors</title>
<updated>2021-02-10T18:44:19Z</updated>
<author>
<name>Andrei Matei</name>
<email>andreimatei1@gmail.com</email>
</author>
<published>2021-02-07T01:10:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a680cb3d8e3f4f84205720b90c926579d04eedb6'/>
<id>urn:sha1:a680cb3d8e3f4f84205720b90c926579d04eedb6</id>
<content type='text'>
The verifier errors around stack accesses have changed slightly in the
previous commit (generally for the better).

Signed-off-by: Andrei Matei &lt;andreimatei1@gmail.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210207011027.676572-3-andreimatei1@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Test unbounded var_off stack access</title>
<updated>2019-04-05T14:50:08Z</updated>
<author>
<name>Andrey Ignatov</name>
<email>rdna@fb.com</email>
</author>
<published>2019-04-04T06:22:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=07f9196241f8bceef975dd15f894f8ed51425d55'/>
<id>urn:sha1:07f9196241f8bceef975dd15f894f8ed51425d55</id>
<content type='text'>
Test the case when reg-&gt;smax_value is too small/big and can overflow,
and separately min and max values outside of stack bounds.

Example of output:
  # ./test_verifier
  #856/p indirect variable-offset stack access, unbounded OK
  #857/p indirect variable-offset stack access, max out of bound OK
  #858/p indirect variable-offset stack access, min out of bound OK

Signed-off-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Test indirect var_off stack access in unpriv mode</title>
<updated>2019-04-05T14:50:08Z</updated>
<author>
<name>Andrey Ignatov</name>
<email>rdna@fb.com</email>
</author>
<published>2019-04-04T06:22:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2c6927dbdc3fbd41207e671212f53a98bbebf6ba'/>
<id>urn:sha1:2c6927dbdc3fbd41207e671212f53a98bbebf6ba</id>
<content type='text'>
Test that verifier rejects indirect stack access with variable offset in
unprivileged mode and accepts same code in privileged mode.

Since pointer arithmetics is prohibited in unprivileged mode verifier
should reject the program even before it gets to helper call that uses
variable offset, at the time when that variable offset is trying to be
constructed.

Example of output:
  # ./test_verifier
  ...
  #859/u indirect variable-offset stack access, priv vs unpriv OK
  #859/p indirect variable-offset stack access, priv vs unpriv OK

Signed-off-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Test indirect var_off stack access in raw mode</title>
<updated>2019-04-05T14:50:07Z</updated>
<author>
<name>Andrey Ignatov</name>
<email>rdna@fb.com</email>
</author>
<published>2019-04-04T06:22:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f68a5b44647bce6c34b10d5560c5b2c0aff31afc'/>
<id>urn:sha1:f68a5b44647bce6c34b10d5560c5b2c0aff31afc</id>
<content type='text'>
Test that verifier rejects indirect access to uninitialized stack with
variable offset.

Example of output:
  # ./test_verifier
  ...
  #859/p indirect variable-offset stack access, uninitialized OK

Signed-off-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Test variable offset stack access</title>
<updated>2019-03-29T19:05:35Z</updated>
<author>
<name>Andrey Ignatov</name>
<email>rdna@fb.com</email>
</author>
<published>2019-03-29T01:01:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8ff80e96e3ccea5ff0a890d4f18997e0344dbec2'/>
<id>urn:sha1:8ff80e96e3ccea5ff0a890d4f18997e0344dbec2</id>
<content type='text'>
Test different scenarios of indirect variable-offset stack access: out of
bound access (&gt;0), min_off below initialized part of the stack,
max_off+size above initialized part of the stack, initialized stack.

Example of output:
  ...
  #856/p indirect variable-offset stack access, out of bound OK
  #857/p indirect variable-offset stack access, max_off+size &gt; max_initialized OK
  #858/p indirect variable-offset stack access, min_off &lt; min_initialized OK
  #859/p indirect variable-offset stack access, ok OK
  ...

Signed-off-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: break up test_verifier</title>
<updated>2019-01-28T05:37:45Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2019-01-25T23:24:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=40f2fbd5a5e9c6d0799632fcba174a7b45c471da'/>
<id>urn:sha1:40f2fbd5a5e9c6d0799632fcba174a7b45c471da</id>
<content type='text'>
Break up the first 10 kLoC of test verifier test cases
out into smaller files.  Looks like git line counting
gets a little flismy above 16 bit integers, so we need
two commits to break up test_verifier.

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>
