Lines Matching defs:subprog
26 u32 callsite; /* call insn that invoked this subprog (subprog_start for depth 0) */
27 u32 depth; /* call depth (0 = entry subprog) */
28 u32 subprog; /* subprog index */
29 u32 subprog_start; /* cached env->subprog_info[subprog].start */
51 * For depth == 0 (entry subprog), @callsite is the subprog start insn.
52 * For depth > 0, @callsite is the call instruction index that invoked the subprog.
76 u32 callsite, int subprog)
79 u32 subprog_start = env->subprog_info[subprog].start;
93 f->subprog = subprog;
95 f->insn_cnt = (env->subprog_info + subprog + 1)->start - subprog_start;
311 struct bpf_subprog_info *subprog;
315 subprog = &env->subprog_info[instance->subprog];
316 po_start = subprog->postorder_start;
317 po_end = (subprog + 1)->postorder_start;
408 static char *fmt_subprog(struct bpf_verifier_env *env, int subprog)
410 const char *name = env->subprog_info[subprog].name;
413 "subprog#%d%s%s", subprog, name ? " " : "", name ? name : "");
480 int start = env->subprog_info[instance->subprog].start;
491 verbose(env, "stack use/def %s ", fmt_subprog(env, instance->subprog));
1107 * at_stack_out[slot] is not cleared by the helper and subprog calls.
1396 * For a calls_callback helper, find the callback subprog and determine
1446 /* Per-subprog intermediate state kept alive across analysis phases */
1453 int subprog,
1458 int start = env->subprog_info[subprog].start;
1465 verbose(env, "%s:\n", fmt_subprog(env, subprog));
1524 * Compute arg tracking dataflow for a single subprog.
1529 * NULL for main (subprog 0).
1538 int subprog = instance->subprog;
1541 int start = env->subprog_info[subprog].start;
1542 int po_start = env->subprog_info[subprog].postorder_start;
1543 int end = env->subprog_info[subprog + 1].start;
1544 int po_end = env->subprog_info[subprog + 1].postorder_start;
1591 verbose(env, "subprog#%d: analyzing (depth %d)...\n", subprog, depth);
1667 print_subprog_arg_access(env, subprog, info, at_stack_in);
1732 f->subprog = src->subprog;
1748 * Recursively analyze a subprog with specific 'entry_args'.
1762 int subprog = instance->subprog;
1765 int start = env->subprog_info[subprog].start;
1766 int po_start = env->subprog_info[subprog].postorder_start;
1767 int po_end = env->subprog_info[subprog + 1].postorder_start;
1795 /* Free prior analysis if this subprog was already visited */
1796 kvfree(info[subprog].at_in);
1797 info[subprog].at_in = NULL;
1799 err = compute_subprog_args(env, &info[subprog], entry_args, instance, callsites);
1803 /* For each reachable call site in the subprog, recurse into callees */
1813 j = idx - start; /* relative index within this subprog */
1823 callee_args[r] = info[subprog].at_in[j][r];
1831 if (info[subprog].at_in[j][caller_reg].frame == ARG_NONE)
1845 callee_args[cb_callee_reg] = info[subprog].at_in[j][caller_reg];
1934 * each subprog is analyzed before its callees, allowing the