]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix also no-alu32 strobemeta selftest
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 1 Nov 2021 23:01:18 +0000 (16:01 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Nov 2021 23:07:27 +0000 (16:07 -0700)
commitf488abf77add78ab62355a0ae83fd0c23b8d1e0d
treef7be8dacc857231a592d7a0f8bec1ad077d7eed6
parent2399a3cc79d8201d1727dc0c48863f75440c99fc
selftests/bpf: Fix also no-alu32 strobemeta selftest

Previous fix aded bpf_clamp_umax() helper use to re-validate boundaries.
While that works correctly, it introduces more branches, which blows up
past 1 million instructions in no-alu32 variant of strobemeta selftests.

Switching len variable from u32 to u64 also fixes the issue and reduces
the number of validated instructions, so use that instead. Fix this
patch and bpf_clamp_umax() removed, both alu32 and no-alu32 selftests
pass.

Fixes: 13b4fc0e70d1 ("selftests/bpf: Fix strobemeta selftest regression")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211101230118.1273019-1-andrii@kernel.org
tools/testing/selftests/bpf/progs/strobemeta.h