]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Jan 2022 17:42:47 +0000 (18:42 +0100)
commit487fc8d412f5ed7ef2a558b0024aa63a66e54cb8
treea510665fe9dccbc5eb2ff9b7f2c7fa836d79deed
parented24c0bf8e92b3285df5a8bb7a5525568660fd10
selftests/bpf: Fix also no-alu32 strobemeta selftest

BugLink: https://bugs.launchpad.net/bugs/1953387
commit a20eac0af02810669e187cb623bc904908c423af upstream.

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: 0133c20480b1 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
tools/testing/selftests/bpf/progs/strobemeta.h