Lines Matching refs:prog

21 	const struct bpf_prog *prog = ctx->prog;  in build_body()  local
24 for (i = 0; i < prog->len; i++) { in build_body()
25 const struct bpf_insn *insn = &prog->insnsi[i]; in build_body()
45 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() argument
49 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile()
54 if (!prog->jit_requested) in bpf_int_jit_compile()
57 tmp = bpf_jit_blind_constants(prog); in bpf_int_jit_compile()
60 if (tmp != prog) { in bpf_int_jit_compile()
62 prog = tmp; in bpf_int_jit_compile()
65 jit_data = prog->aux->jit_data; in bpf_int_jit_compile()
69 prog = orig_prog; in bpf_int_jit_compile()
72 prog->aux->jit_data = jit_data; in bpf_int_jit_compile()
83 ctx->arena_vm_start = bpf_arena_get_kern_vm_start(prog->aux->arena); in bpf_int_jit_compile()
84 ctx->user_vm_start = bpf_arena_get_user_vm_start(prog->aux->arena); in bpf_int_jit_compile()
85 ctx->prog = prog; in bpf_int_jit_compile()
86 ctx->offset = kcalloc(prog->len, sizeof(int), GFP_KERNEL); in bpf_int_jit_compile()
88 prog = orig_prog; in bpf_int_jit_compile()
93 prog = orig_prog; in bpf_int_jit_compile()
97 for (i = 0; i < prog->len; i++) { in bpf_int_jit_compile()
106 bpf_jit_build_prologue(ctx, bpf_is_subprog(prog)); in bpf_int_jit_compile()
110 prog = orig_prog; in bpf_int_jit_compile()
121 extable_size = prog->aux->num_exentries * in bpf_int_jit_compile()
131 prog = orig_prog; in bpf_int_jit_compile()
154 prog = orig_prog; in bpf_int_jit_compile()
159 prog->aux->extable = (void *)ctx->ro_insns + prog_size; in bpf_int_jit_compile()
166 bpf_jit_build_prologue(ctx, bpf_is_subprog(prog)); in bpf_int_jit_compile()
168 prog = orig_prog; in bpf_int_jit_compile()
174 bpf_jit_dump(prog->len, prog_size, pass, ctx->insns); in bpf_int_jit_compile()
176 prog->bpf_func = (void *)ctx->ro_insns + cfi_get_offset(); in bpf_int_jit_compile()
177 prog->jited = 1; in bpf_int_jit_compile()
178 prog->jited_len = prog_size - cfi_get_offset(); in bpf_int_jit_compile()
180 if (!prog->is_func || extra_pass) { in bpf_int_jit_compile()
184 prog = orig_prog; in bpf_int_jit_compile()
194 for (i = 0; i < prog->len; i++) in bpf_int_jit_compile()
196 bpf_prog_fill_jited_linfo(prog, ctx->offset); in bpf_int_jit_compile()
200 prog->aux->jit_data = NULL; in bpf_int_jit_compile()
205 bpf_jit_prog_release_other(prog, prog == orig_prog ? in bpf_int_jit_compile()
207 return prog; in bpf_int_jit_compile()
248 void bpf_jit_free(struct bpf_prog *prog) in bpf_jit_free() argument
250 if (prog->jited) { in bpf_jit_free()
251 struct rv_jit_data *jit_data = prog->aux->jit_data; in bpf_jit_free()
263 hdr = bpf_jit_binary_pack_hdr(prog); in bpf_jit_free()
265 WARN_ON_ONCE(!bpf_prog_kallsyms_verify_off(prog)); in bpf_jit_free()
268 bpf_prog_unlock_free(prog); in bpf_jit_free()