summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/verifier.c
diff options
context:
space:
mode:
authorDmitrii Banshchikov <me@ubique.spb.ru>2021-02-25 21:26:29 +0100
committerAlexei Starovoitov <ast@kernel.org>2021-02-26 20:59:53 +0100
commit523a4cf491b3c9e2d546040d57250f1a0ca84f03 (patch)
tree30081a18f353e9e02c2260759875d0fed7b8e9ac /kernel/bpf/verifier.c
parentMerge branch 'bpf: enable task local storage for tracing' (diff)
downloadlinux-523a4cf491b3c9e2d546040d57250f1a0ca84f03.tar.xz
linux-523a4cf491b3c9e2d546040d57250f1a0ca84f03.zip
bpf: Use MAX_BPF_FUNC_REG_ARGS macro
Instead of using integer literal here and there use macro name for better context. Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20210225202629.585485-1-me@ubique.spb.ru
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r--kernel/bpf/verifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 1dda9d81f12c..9f7e35590fc6 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5544,7 +5544,7 @@ static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn
meta.func_id = func_id;
/* check args */
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < MAX_BPF_FUNC_REG_ARGS; i++) {
err = check_func_arg(env, i, &meta, fn);
if (err)
return err;