|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2 |
|
| #
973cb138 |
| 04-Feb-2025 |
Daniel Xu <[email protected]> |
bpf: selftests: Test constant key extraction on irrelevant maps
Test that very high constant map keys are not interpreted as an error value by the verifier. This would previously fail.
Acked-by: Ed
bpf: selftests: Test constant key extraction on irrelevant maps
Test that very high constant map keys are not interpreted as an error value by the verifier. This would previously fail.
Acked-by: Eduard Zingerman <[email protected]> Signed-off-by: Daniel Xu <[email protected]> Link: https://lore.kernel.org/r/c0590b62eb9303f389b2f52c0c7e9cf22a358a30.1738689872.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc1, v6.13 |
|
| #
f932a8e4 |
| 14-Jan-2025 |
Daniel Xu <[email protected]> |
bpf: selftests: verifier: Add nullness elision tests
Test that nullness elision works for common use cases. For example, we want to check that both constant scalar spills and STACK_ZERO functions. A
bpf: selftests: verifier: Add nullness elision tests
Test that nullness elision works for common use cases. For example, we want to check that both constant scalar spills and STACK_ZERO functions. As well as when there's both const and non-const values of R2 leading up to a lookup. And obviously some bound checks.
Particularly tricky are spills both smaller or larger than key size. For smaller, we need to ensure verifier doesn't let through a potential read into unchecked bytes. For larger, endianness comes into play, as the native endian value tracked in the verifier may not be the bytes the kernel would have read out of the key pointer. So check that we disallow both.
Signed-off-by: Daniel Xu <[email protected]> Link: https://lore.kernel.org/r/f1dacaa777d4516a5476162e0ea549f7c3354d73.1736886479.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
b87f5840 |
| 26-Oct-2024 |
Puranjay Mohan <[email protected]> |
selftests/bpf: Don't mask result of bpf_csum_diff() in test_verifier
The bpf_csum_diff() helper has been fixed to return a 16-bit value for all archs, so now we don't need to mask the result.
This
selftests/bpf: Don't mask result of bpf_csum_diff() in test_verifier
The bpf_csum_diff() helper has been fixed to return a 16-bit value for all archs, so now we don't need to mask the result.
This commit is basically reverting the below:
commit 6185266c5a85 ("selftests/bpf: Mask bpf_csum_diff() return value to 16 bits in test_verifier")
Signed-off-by: Puranjay Mohan <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
show more ...
|
|
Revision tags: v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3 |
|
| #
cbb110bc |
| 20-Apr-2023 |
Eduard Zingerman <[email protected]> |
selftests/bpf: populate map_array_ro map for verifier_array_access test
Two test cases: - "valid read map access into a read-only array 1" and - "valid read map access into a read-only array 2"
Exp
selftests/bpf: populate map_array_ro map for verifier_array_access test
Two test cases: - "valid read map access into a read-only array 1" and - "valid read map access into a read-only array 2"
Expect that map_array_ro map is filled with mock data. This logic was not taken into acount during initial test conversion.
This commit modifies prog_tests/verifier.c entry point for this test to fill the map.
Fixes: a3c830ae0209 ("selftests/bpf: verifier/array_access.c converted to inline assembly") Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
show more ...
|
| #
7cdddb99 |
| 20-Apr-2023 |
Eduard Zingerman <[email protected]> |
selftests/bpf: fix __retval() being always ignored
Florian Westphal found a bug in and suggested a fix for test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do
selftests/bpf: fix __retval() being always ignored
Florian Westphal found a bug in and suggested a fix for test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do_prog_test_run() never executed and all __retval test tags were ignored.
If this bug is fixed a number of test cases from progs/verifier_array_access.c fail with retval not matching the expected value. This test was recently converted to use test_loader.c and inline assembly in [1]. When doing the conversion I missed the important detail of test_verifier.c operation: when it creates fixup_map_array_ro, fixup_map_array_wo and fixup_map_array_small it populates these maps with a dummy record.
Disabling the __retval checks for the affected verifier_array_access in this commit to avoid false-postivies in any potential bisects. The issue is addressed in the next patch.
I verified that the __retval tags are now respected by changing expected return values for all tests annotated with __retval, and checking that these tests started to fail.
[1] https://lore.kernel.org/bpf/[email protected]/
Fixes: 19a8e06f5f91 ("selftests/bpf: Tests execution support for test_loader.c") Reported-by: Florian Westphal <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]/T/ Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4 |
|
| #
a3c830ae |
| 25-Mar-2023 |
Eduard Zingerman <[email protected]> |
selftests/bpf: verifier/array_access.c converted to inline assembly
Test verifier/array_access.c automatically converted to use inline assembly.
Signed-off-by: Eduard Zingerman <[email protected]>
selftests/bpf: verifier/array_access.c converted to inline assembly
Test verifier/array_access.c automatically converted to use inline assembly.
Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
show more ...
|