From: Alexei Starovoitov A prog that uses Rust crates can have more than 256 functions that the compiler does not inline. The verifier rejects a prog with 777 subprogs: too many subprograms Bump the limit to 1024. Two arrays in struct bpf_verifier_env grow: subprog_info[] and subprog_topo_order[]. The verifier allocates the struct with kvzalloc(), thus the size is not a problem. A load from a table of functions can give BPF_MAX_SUBPROGS different pointers. This limit grows too. Signed-off-by: Alexei Starovoitov --- include/linux/bpf_verifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 6139e889c86a..51abcaead6b9 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -974,7 +974,7 @@ struct bpf_verifier_log *bpf_log_attr_create_vlog(struct bpf_log_attr *attr_log, u32 size); int bpf_log_attr_finalize(struct bpf_log_attr *attr, struct bpf_verifier_log *log); -#define BPF_MAX_SUBPROGS 256 +#define BPF_MAX_SUBPROGS 1024 /* * A pointer to a static subprog in the value of a frozen read-only array map: -- 2.55.0