]> git.hungrycats.org Git - linux/commit
selftests/bpf: Add a selftest for x86 jit convergence issues
authorYonghong Song <yonghong.song@linux.dev>
Wed, 4 Sep 2024 22:12:56 +0000 (15:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 4 Sep 2024 23:46:22 +0000 (16:46 -0700)
commiteff5b5fffc1d39fb9e5e66d6aa4ed3fcb109caac
tree2e3852a76c55a56d84a47afc852212776c697a57
parentc8831bdbfbab672c006a18006d36932a494b2fd6
selftests/bpf: Add a selftest for x86 jit convergence issues

The core part of the selftest, i.e., the je <-> jmp cycle, mimics the
original sched-ext bpf program. The test will fail without the
previous patch.

I tried to create some cases for other potential cycles
(je <-> je, jmp <-> je and jmp <-> jmp) with similar pattern
to the test in this patch, but failed. So this patch
only contains one test for je <-> jmp cycle.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240904221256.37389-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/verifier.c
tools/testing/selftests/bpf/progs/verifier_jit_convergence.c [new file with mode: 0644]