pyperf600 is a verifier scale test. With newer LLVM, calling __on_event() twice can push the generated program over the verifier jump sequence complexity limit (8192), failing with:
The sequence of 8193 jumps is too complex. Let pyperf600 provide its own on_event() that calls __on_event() once, and guard the shared wrapper accordingly. Other pyperf600 variants are unaffected. Signed-off-by: Sun Jian <[email protected]> --- v2: - Drop runtime -E2BIG skip; instead tweak pyperf600 program source to avoid hitting the verifier jump sequence complexity limit. - verif_scale_pyperf600 now passes; other pyperf600 variants unchanged. tools/testing/selftests/bpf/progs/pyperf.h | 4 +++- tools/testing/selftests/bpf/progs/pyperf600.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/pyperf.h b/tools/testing/selftests/bpf/progs/pyperf.h index 86484f07e1d1..c02c49c52c77 100644 --- a/tools/testing/selftests/bpf/progs/pyperf.h +++ b/tools/testing/selftests/bpf/progs/pyperf.h @@ -343,8 +343,9 @@ int __on_event(struct bpf_raw_tracepoint_args *ctx) return 0; } +#ifndef PYPERF_CUSTOM_ON_EVENT SEC("raw_tracepoint/kfree_skb") -int on_event(struct bpf_raw_tracepoint_args* ctx) +int on_event(struct bpf_raw_tracepoint_args *ctx) { int ret = 0; ret |= __on_event(ctx); @@ -354,5 +355,6 @@ int on_event(struct bpf_raw_tracepoint_args* ctx) ret |= __on_event(ctx); return ret; } +#endif char _license[] SEC("license") = "GPL"; diff --git a/tools/testing/selftests/bpf/progs/pyperf600.c b/tools/testing/selftests/bpf/progs/pyperf600.c index ce1aa5189cc4..31e8a422d804 100644 --- a/tools/testing/selftests/bpf/progs/pyperf600.c +++ b/tools/testing/selftests/bpf/progs/pyperf600.c @@ -9,4 +9,11 @@ * the loop will still execute 600 times. */ #define UNROLL_COUNT 150 +#define PYPERF_CUSTOM_ON_EVENT #include "pyperf.h" + +SEC("raw_tracepoint/kfree_skb") +int on_event(struct bpf_raw_tracepoint_args *ctx) +{ + return __on_event(ctx); +} base-commit: 5ee8dbf54602dc340d6235b1d6aa17c0f283f48c -- 2.43.0
