• Home
  • Raw
  • Download

Lines Matching refs:kp

360 static inline void set_kprobe_instance(struct kprobe *kp)  in set_kprobe_instance()  argument
362 __this_cpu_write(kprobe_instance, kp); in set_kprobe_instance()
424 struct kprobe *kp; in opt_pre_handler() local
426 list_for_each_entry_rcu(kp, &p->list, list) { in opt_pre_handler()
427 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in opt_pre_handler()
428 set_kprobe_instance(kp); in opt_pre_handler()
429 kp->pre_handler(kp, regs); in opt_pre_handler()
441 op = container_of(p, struct optimized_kprobe, kp); in free_aggr_kprobe()
453 op = container_of(p, struct optimized_kprobe, kp); in kprobe_optready()
469 op = container_of(p, struct optimized_kprobe, kp); in kprobe_disarmed()
480 op = container_of(p, struct optimized_kprobe, kp); in kprobe_queued()
502 op = container_of(p, struct optimized_kprobe, kp); in get_optimized_kprobe()
564 op->kp.flags &= ~KPROBE_FLAG_OPTIMIZED; in do_unoptimize_kprobes()
566 if (kprobe_disabled(&op->kp) && !kprobe_gone(&op->kp)) in do_unoptimize_kprobes()
567 arch_disarm_kprobe(&op->kp); in do_unoptimize_kprobes()
568 if (kprobe_unused(&op->kp)) { in do_unoptimize_kprobes()
574 hlist_del_rcu(&op->kp.hlist); in do_unoptimize_kprobes()
587 if (WARN_ON_ONCE(!kprobe_unused(&op->kp))) { in do_free_cleaned_kprobes()
594 free_aggr_kprobe(&op->kp); in do_free_cleaned_kprobes()
689 op = container_of(p, struct optimized_kprobe, kp); in optimize_kprobe()
696 if (op->kp.flags & KPROBE_FLAG_OPTIMIZED) { in optimize_kprobe()
703 op->kp.flags |= KPROBE_FLAG_OPTIMIZED; in optimize_kprobe()
721 op->kp.flags &= ~KPROBE_FLAG_OPTIMIZED; in force_unoptimize_kprobe()
732 op = container_of(p, struct optimized_kprobe, kp); in unoptimize_kprobe()
750 op->kp.flags &= ~KPROBE_FLAG_OPTIMIZED; in unoptimize_kprobe()
774 op = container_of(ap, struct optimized_kprobe, kp); in reuse_unused_kprobe()
791 op = container_of(p, struct optimized_kprobe, kp); in kill_optimized_kprobe()
795 op->kp.flags &= ~KPROBE_FLAG_OPTIMIZED; in kill_optimized_kprobe()
823 op = container_of(p, struct optimized_kprobe, kp); in prepare_optimized_kprobe()
837 op->kp.addr = p->addr; in alloc_aggr_kprobe()
840 return &op->kp; in alloc_aggr_kprobe()
867 op = container_of(ap, struct optimized_kprobe, kp); in try_to_optimize_kprobe()
1160 static int arm_kprobe(struct kprobe *kp) in arm_kprobe() argument
1162 if (unlikely(kprobe_ftrace(kp))) in arm_kprobe()
1163 return arm_kprobe_ftrace(kp); in arm_kprobe()
1167 __arm_kprobe(kp); in arm_kprobe()
1174 static int disarm_kprobe(struct kprobe *kp, bool reopt) in disarm_kprobe() argument
1176 if (unlikely(kprobe_ftrace(kp))) in disarm_kprobe()
1177 return disarm_kprobe_ftrace(kp); in disarm_kprobe()
1181 __disarm_kprobe(kp, reopt); in disarm_kprobe()
1194 struct kprobe *kp; in aggr_pre_handler() local
1196 list_for_each_entry_rcu(kp, &p->list, list) { in aggr_pre_handler()
1197 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in aggr_pre_handler()
1198 set_kprobe_instance(kp); in aggr_pre_handler()
1199 if (kp->pre_handler(kp, regs)) in aggr_pre_handler()
1211 struct kprobe *kp; in aggr_post_handler() local
1213 list_for_each_entry_rcu(kp, &p->list, list) { in aggr_post_handler()
1214 if (kp->post_handler && likely(!kprobe_disabled(kp))) { in aggr_post_handler()
1215 set_kprobe_instance(kp); in aggr_post_handler()
1216 kp->post_handler(kp, regs, flags); in aggr_post_handler()
1226 struct kprobe *kp; in kprobes_inc_nmissed_count() local
1231 list_for_each_entry_rcu(kp, &p->list, list) in kprobes_inc_nmissed_count()
1232 kp->nmissed++; in kprobes_inc_nmissed_count()
1689 struct kprobe *kp; in aggr_kprobe_disabled() local
1693 list_for_each_entry(kp, &ap->list, list) in aggr_kprobe_disabled()
1694 if (!kprobe_disabled(kp)) in aggr_kprobe_disabled()
2053 __this_cpu_write(current_kprobe, &rp->kp); in __kretprobe_trampoline_handler()
2089 struct kretprobe *rp = container_of(p, struct kretprobe, kp); in NOKPROBE_SYMBOL()
2120 struct kretprobe *rp = container_of(p, struct kretprobe, kp); in pre_handler_kretprobe()
2152 __this_cpu_write(current_kprobe, &rp->kp); in kretprobe_rethook_handler()
2199 ret = kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset); in register_kretprobe()
2204 if (rp->kp.addr && warn_kprobe_rereg(&rp->kp)) in register_kretprobe()
2208 addr = kprobe_addr(&rp->kp); in register_kretprobe()
2221 rp->kp.pre_handler = pre_handler_kretprobe; in register_kretprobe()
2222 rp->kp.post_handler = NULL; in register_kretprobe()
2245 ret = register_kprobe(&rp->kp); in register_kretprobe()
2272 ret = register_kprobe(&rp->kp); in register_kretprobe()
2312 if (__unregister_kprobe_top(&rps[i]->kp) < 0) in unregister_kretprobes()
2313 rps[i]->kp.addr = NULL; in unregister_kretprobes()
2324 if (rps[i]->kp.addr) { in unregister_kretprobes()
2325 __unregister_kprobe_bottom(&rps[i]->kp); in unregister_kretprobes()
2368 struct kprobe *kp; in kill_kprobe() local
2386 list_for_each_entry(kp, &p->list, list) in kill_kprobe()
2387 kp->flags |= KPROBE_FLAG_GONE; in kill_kprobe()
2399 int disable_kprobe(struct kprobe *kp) in disable_kprobe() argument
2407 p = __disable_kprobe(kp); in disable_kprobe()
2417 int enable_kprobe(struct kprobe *kp) in enable_kprobe() argument
2425 p = __get_valid_kprobe(kp); in enable_kprobe()
2431 if (kprobe_gone(kp)) { in enable_kprobe()
2437 if (p != kp) in enable_kprobe()
2438 kp->flags &= ~KPROBE_FLAG_DISABLED; in enable_kprobe()
2445 if (p != kp) in enable_kprobe()
2446 kp->flags |= KPROBE_FLAG_DISABLED; in enable_kprobe()
2456 void dump_kprobe(struct kprobe *kp) in dump_kprobe() argument
2459 kp->symbol_name, kp->offset, kp->addr); in dump_kprobe()
2818 struct kprobe *p, *kp; in show_kprobe_addr() local
2830 list_for_each_entry_rcu(kp, &p->list, list) in show_kprobe_addr()
2831 report_probe(pi, kp, sym, offset, modname, p); in show_kprobe_addr()