Lines Matching refs:ksym

116 	INIT_LIST_HEAD_RCU(&fp->aux->ksym.lnode);  in bpf_prog_alloc_no_stats()
549 prog->aux->ksym.start = (unsigned long) prog->bpf_func; in bpf_prog_ksym_set_addr()
550 prog->aux->ksym.end = prog->aux->ksym.start + prog->jited_len; in bpf_prog_ksym_set_addr()
556 char *sym = prog->aux->ksym.name; in bpf_prog_ksym_set_name()
604 const struct bpf_ksym *ksym; in bpf_tree_comp() local
606 ksym = container_of(n, struct bpf_ksym, tnode); in bpf_tree_comp()
608 if (val < ksym->start) in bpf_tree_comp()
610 if (val >= ksym->end) in bpf_tree_comp()
625 void bpf_ksym_add(struct bpf_ksym *ksym) in bpf_ksym_add() argument
628 WARN_ON_ONCE(!list_empty(&ksym->lnode)); in bpf_ksym_add()
629 list_add_tail_rcu(&ksym->lnode, &bpf_kallsyms); in bpf_ksym_add()
630 latch_tree_insert(&ksym->tnode, &bpf_tree, &bpf_tree_ops); in bpf_ksym_add()
634 static void __bpf_ksym_del(struct bpf_ksym *ksym) in __bpf_ksym_del() argument
636 if (list_empty(&ksym->lnode)) in __bpf_ksym_del()
639 latch_tree_erase(&ksym->tnode, &bpf_tree, &bpf_tree_ops); in __bpf_ksym_del()
640 list_del_rcu(&ksym->lnode); in __bpf_ksym_del()
643 void bpf_ksym_del(struct bpf_ksym *ksym) in bpf_ksym_del() argument
646 __bpf_ksym_del(ksym); in bpf_ksym_del()
663 fp->aux->ksym.prog = true; in bpf_prog_kallsyms_add()
665 bpf_ksym_add(&fp->aux->ksym); in bpf_prog_kallsyms_add()
673 bpf_ksym_del(&fp->aux->ksym); in bpf_prog_kallsyms_del()
687 struct bpf_ksym *ksym; in __bpf_address_lookup() local
691 ksym = bpf_ksym_find(addr); in __bpf_address_lookup()
692 if (ksym) { in __bpf_address_lookup()
693 unsigned long symbol_start = ksym->start; in __bpf_address_lookup()
694 unsigned long symbol_end = ksym->end; in __bpf_address_lookup()
696 strncpy(sym, ksym->name, KSYM_NAME_LEN); in __bpf_address_lookup()
722 struct bpf_ksym *ksym = bpf_ksym_find(addr); in bpf_prog_ksym_find() local
724 return ksym && ksym->prog ? in bpf_prog_ksym_find()
725 container_of(ksym, struct bpf_prog_aux, ksym)->prog : in bpf_prog_ksym_find()
750 struct bpf_ksym *ksym; in bpf_get_kallsym() local
758 list_for_each_entry_rcu(ksym, &bpf_kallsyms, lnode) { in bpf_get_kallsym()
762 strncpy(sym, ksym->name, KSYM_NAME_LEN); in bpf_get_kallsym()
764 *value = ksym->start; in bpf_get_kallsym()