Lines Matching refs:prog
194 *ip_arg |= aux->prog->call_get_func_ip; in bpf_trampoline_get_progs()
195 *progs++ = aux->prog; in bpf_trampoline_get_progs()
392 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp() argument
394 switch (prog->expected_attach_type) { in bpf_attach_type_to_tramp()
402 if (!prog->aux->attach_func_proto->type) in bpf_attach_type_to_tramp()
414 int bpf_trampoline_link_prog(struct bpf_prog *prog, struct bpf_trampoline *tr) in bpf_trampoline_link_prog() argument
420 kind = bpf_attach_type_to_tramp(prog); in bpf_trampoline_link_prog()
436 tr->extension_prog = prog; in bpf_trampoline_link_prog()
438 prog->bpf_func); in bpf_trampoline_link_prog()
445 if (!hlist_unhashed(&prog->aux->tramp_hlist)) { in bpf_trampoline_link_prog()
450 hlist_add_head(&prog->aux->tramp_hlist, &tr->progs_hlist[kind]); in bpf_trampoline_link_prog()
454 hlist_del_init(&prog->aux->tramp_hlist); in bpf_trampoline_link_prog()
463 int bpf_trampoline_unlink_prog(struct bpf_prog *prog, struct bpf_trampoline *tr) in bpf_trampoline_unlink_prog() argument
468 kind = bpf_attach_type_to_tramp(prog); in bpf_trampoline_unlink_prog()
477 hlist_del_init(&prog->aux->tramp_hlist); in bpf_trampoline_unlink_prog()
542 static void notrace inc_misses_counter(struct bpf_prog *prog) in inc_misses_counter() argument
546 stats = this_cpu_ptr(prog->stats); in inc_misses_counter()
565 u64 notrace __bpf_prog_enter(struct bpf_prog *prog) in __bpf_prog_enter() argument
570 if (unlikely(__this_cpu_inc_return(*(prog->active)) != 1)) { in __bpf_prog_enter()
571 inc_misses_counter(prog); in __bpf_prog_enter()
577 static void notrace update_prog_stats(struct bpf_prog *prog, in update_prog_stats() argument
591 stats = this_cpu_ptr(prog->stats); in update_prog_stats()
599 void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start) in __bpf_prog_exit() argument
602 update_prog_stats(prog, start); in __bpf_prog_exit()
603 __this_cpu_dec(*(prog->active)); in __bpf_prog_exit()
608 u64 notrace __bpf_prog_enter_sleepable(struct bpf_prog *prog) in __bpf_prog_enter_sleepable() argument
613 if (unlikely(__this_cpu_inc_return(*(prog->active)) != 1)) { in __bpf_prog_enter_sleepable()
614 inc_misses_counter(prog); in __bpf_prog_enter_sleepable()
620 void notrace __bpf_prog_exit_sleepable(struct bpf_prog *prog, u64 start) in __bpf_prog_exit_sleepable() argument
622 update_prog_stats(prog, start); in __bpf_prog_exit_sleepable()
623 __this_cpu_dec(*(prog->active)); in __bpf_prog_exit_sleepable()