<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/bpf/verifier/regalloc.c, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/bpf/verifier/regalloc.c?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/bpf/verifier/regalloc.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<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>
<email>bjorn.topel@gmail.com</email>
</author>
<published>2020-11-18T07:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/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: Fix register equivalence tracking.</title>
<updated>2020-10-15T14:05:31Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@kernel.org</email>
</author>
<published>2020-10-14T17:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e688c3db7ca69bea1872c5706aec6a7fdf89df17'/>
<id>urn:sha1:e688c3db7ca69bea1872c5706aec6a7fdf89df17</id>
<content type='text'>
The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg-&gt;id in either
true or false branch. In the case 'if (reg-&gt;id)' check was done on the other
branch the counter part register would have reg-&gt;id == 0 when called into
find_equal_scalars(). In such case the helper would incorrectly identify other
registers with id == 0 as equivalent and propagate the state incorrectly.
Fix it by preserving ID across reg_set_min_max().

In other words any kind of comparison operator on the scalar register
should preserve its ID to recognize:

r1 = r2
if (r1 == 20) {
  #1 here both r1 and r2 == 20
} else if (r2 &lt; 20) {
  #2 here both r1 and r2 &lt; 20
}

The patch is addressing #1 case. The #2 was working correctly already.

Fixes: 75748837b7e5 ("bpf: Propagate scalar ranges through register assignments.")
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Tested-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20201014175608.1416-1-alexei.starovoitov@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Asm tests for the verifier regalloc tracking.</title>
<updated>2020-10-09T20:03:06Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@kernel.org</email>
</author>
<published>2020-10-09T01:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=54fada41e8a162a45ab13ac4f76af609733d4679'/>
<id>urn:sha1:54fada41e8a162a45ab13ac4f76af609733d4679</id>
<content type='text'>
Add asm tests for register allocator tracking logic.

Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&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/20201009011240.48506-5-alexei.starovoitov@gmail.com
</content>
</entry>
</feed>
