bpf: Remove unused insn_cnt argument from visit_[func_call_]insn()
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 7 Dec 2022 19:55:34 +0000 (11:55 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 7 Dec 2022 21:58:41 +0000 (22:58 +0100)
commitdcb2288b1fd9a8cdf2f3b8c0c7b3763346ef515f
tree28ea7ba7bbc0febb78c45291636701a2117d5f57
parent0a6ea1ce8260f08079b0940350a21e4ad95c2378
bpf: Remove unused insn_cnt argument from visit_[func_call_]insn()

Number of total instructions in BPF program (including subprogs) can and
is accessed from env->prog->len. visit_func_call_insn() doesn't do any
checks against insn_cnt anymore, relying on push_insn() to do this check
internally. So remove unnecessary insn_cnt input argument from
visit_func_call_insn() and visit_insn() functions.

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20221207195534.2866030-1-andrii@kernel.org
kernel/bpf/verifier.c