@@ -1914,19 +1914,19 @@ static char *format_callchain(struct bpf_verifier_env *env, struct bpf_scc_callc
19141914 */
19151915static int maybe_enter_scc(struct bpf_verifier_env *env, struct bpf_verifier_state *st)
19161916{
1917- struct bpf_scc_callchain callchain;
1917+ struct bpf_scc_callchain * callchain = &env->callchain_buf ;
19181918 struct bpf_scc_visit *visit;
19191919
1920- if (!compute_scc_callchain(env, st, & callchain))
1920+ if (!compute_scc_callchain(env, st, callchain))
19211921 return 0;
1922- visit = scc_visit_lookup(env, & callchain);
1923- visit = visit ?: scc_visit_alloc(env, & callchain);
1922+ visit = scc_visit_lookup(env, callchain);
1923+ visit = visit ?: scc_visit_alloc(env, callchain);
19241924 if (!visit)
19251925 return -ENOMEM;
19261926 if (!visit->entry_state) {
19271927 visit->entry_state = st;
19281928 if (env->log.level & BPF_LOG_LEVEL2)
1929- verbose(env, "SCC enter %s\n", format_callchain(env, & callchain));
1929+ verbose(env, "SCC enter %s\n", format_callchain(env, callchain));
19301930 }
19311931 return 0;
19321932}
@@ -1939,21 +1939,21 @@ static int propagate_backedges(struct bpf_verifier_env *env, struct bpf_scc_visi
19391939 */
19401940static int maybe_exit_scc(struct bpf_verifier_env *env, struct bpf_verifier_state *st)
19411941{
1942- struct bpf_scc_callchain callchain;
1942+ struct bpf_scc_callchain * callchain = &env->callchain_buf ;
19431943 struct bpf_scc_visit *visit;
19441944
1945- if (!compute_scc_callchain(env, st, & callchain))
1945+ if (!compute_scc_callchain(env, st, callchain))
19461946 return 0;
1947- visit = scc_visit_lookup(env, & callchain);
1947+ visit = scc_visit_lookup(env, callchain);
19481948 if (!visit) {
19491949 verifier_bug(env, "scc exit: no visit info for call chain %s",
1950- format_callchain(env, & callchain));
1950+ format_callchain(env, callchain));
19511951 return -EFAULT;
19521952 }
19531953 if (visit->entry_state != st)
19541954 return 0;
19551955 if (env->log.level & BPF_LOG_LEVEL2)
1956- verbose(env, "SCC exit %s\n", format_callchain(env, & callchain));
1956+ verbose(env, "SCC exit %s\n", format_callchain(env, callchain));
19571957 visit->entry_state = NULL;
19581958 env->num_backedges -= visit->num_backedges;
19591959 visit->num_backedges = 0;
@@ -1968,22 +1968,22 @@ static int add_scc_backedge(struct bpf_verifier_env *env,
19681968 struct bpf_verifier_state *st,
19691969 struct bpf_scc_backedge *backedge)
19701970{
1971- struct bpf_scc_callchain callchain;
1971+ struct bpf_scc_callchain * callchain = &env->callchain_buf ;
19721972 struct bpf_scc_visit *visit;
19731973
1974- if (!compute_scc_callchain(env, st, & callchain)) {
1974+ if (!compute_scc_callchain(env, st, callchain)) {
19751975 verifier_bug(env, "add backedge: no SCC in verification path, insn_idx %d",
19761976 st->insn_idx);
19771977 return -EFAULT;
19781978 }
1979- visit = scc_visit_lookup(env, & callchain);
1979+ visit = scc_visit_lookup(env, callchain);
19801980 if (!visit) {
19811981 verifier_bug(env, "add backedge: no visit info for call chain %s",
1982- format_callchain(env, & callchain));
1982+ format_callchain(env, callchain));
19831983 return -EFAULT;
19841984 }
19851985 if (env->log.level & BPF_LOG_LEVEL2)
1986- verbose(env, "SCC backedge %s\n", format_callchain(env, & callchain));
1986+ verbose(env, "SCC backedge %s\n", format_callchain(env, callchain));
19871987 backedge->next = visit->backedges;
19881988 visit->backedges = backedge;
19891989 visit->num_backedges++;
@@ -1999,12 +1999,12 @@ static int add_scc_backedge(struct bpf_verifier_env *env,
19991999static bool incomplete_read_marks(struct bpf_verifier_env *env,
20002000 struct bpf_verifier_state *st)
20012001{
2002- struct bpf_scc_callchain callchain;
2002+ struct bpf_scc_callchain * callchain = &env->callchain_buf ;
20032003 struct bpf_scc_visit *visit;
20042004
2005- if (!compute_scc_callchain(env, st, & callchain))
2005+ if (!compute_scc_callchain(env, st, callchain))
20062006 return false;
2007- visit = scc_visit_lookup(env, & callchain);
2007+ visit = scc_visit_lookup(env, callchain);
20082008 if (!visit)
20092009 return false;
20102010 return !!visit->backedges;
0 commit comments