summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
diff options
context:
space:
mode:
authorEduard Zingerman <eddyz87@gmail.com>2023-04-07 18:41:25 +0300
committerAndrii Nakryiko <andrii@kernel.org>2023-04-07 15:30:31 -0700
commit5855b0999de4213bf51d856a345c4b53f2304e33 (patch)
tree5f9619d7cfcad0a3db298d7851e4a4920d0926bd /tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
parentb24f0b049e706c6fc6e822dfc519ee33c3865092 (diff)
downloadlinux-5855b0999de4213bf51d856a345c4b53f2304e33.tar.gz
linux-5855b0999de4213bf51d856a345c4b53f2304e33.tar.bz2
linux-5855b0999de4213bf51d856a345c4b53f2304e33.zip
selftests/bpf: Prevent infinite loop in veristat when base file is too short
The following example forces veristat to loop indefinitely: $ cat two-ok file_name,prog_name,verdict,total_states file-a,a,success,12 file-b,b,success,67 $ cat add-failure file_name,prog_name,verdict,total_states file-a,a,success,12 file-b,b,success,67 file-b,c,failure,32 $ veristat -C two-ok add-failure <does not return> The loop is caused by handle_comparison_mode() not checking if `base` variable points to `fallback_stats` prior advancing joined results using `base`. Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20230407154125.896927-1-eddyz87@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c')
0 files changed, 0 insertions, 0 deletions