• Home
  • Raw
  • Download

Lines Matching refs:kp

288 static inline void set_kprobe_instance(struct kprobe *kp)  in set_kprobe_instance()  argument
290 __this_cpu_write(kprobe_instance, kp); in set_kprobe_instance()
353 struct kprobe *kp; in opt_pre_handler() local
355 list_for_each_entry_rcu(kp, &p->list, list) { in opt_pre_handler()
356 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in opt_pre_handler()
357 set_kprobe_instance(kp); in opt_pre_handler()
358 kp->pre_handler(kp, regs); in opt_pre_handler()
370 op = container_of(p, struct optimized_kprobe, kp); in free_aggr_kprobe()
382 op = container_of(p, struct optimized_kprobe, kp); in kprobe_optready()
398 op = container_of(p, struct optimized_kprobe, kp); in kprobe_disarmed()
409 op = container_of(p, struct optimized_kprobe, kp); in kprobe_queued()
431 op = container_of(p, struct optimized_kprobe, kp); in get_optimized_kprobe()
495 if (kprobe_disabled(&op->kp)) in do_unoptimize_kprobes()
496 arch_disarm_kprobe(&op->kp); in do_unoptimize_kprobes()
497 if (kprobe_unused(&op->kp)) { in do_unoptimize_kprobes()
503 hlist_del_rcu(&op->kp.hlist); in do_unoptimize_kprobes()
518 if (WARN_ON_ONCE(!kprobe_unused(&op->kp))) { in do_free_cleaned_kprobes()
525 free_aggr_kprobe(&op->kp); in do_free_cleaned_kprobes()
605 op = container_of(p, struct optimized_kprobe, kp); in optimize_kprobe()
612 if (op->kp.flags & KPROBE_FLAG_OPTIMIZED) in optimize_kprobe()
614 op->kp.flags |= KPROBE_FLAG_OPTIMIZED; in optimize_kprobe()
631 if (kprobe_disabled(&op->kp)) in force_unoptimize_kprobe()
632 arch_disarm_kprobe(&op->kp); in force_unoptimize_kprobe()
643 op = container_of(p, struct optimized_kprobe, kp); in unoptimize_kprobe()
658 op->kp.flags &= ~KPROBE_FLAG_OPTIMIZED; in unoptimize_kprobe()
684 op = container_of(ap, struct optimized_kprobe, kp); in reuse_unused_kprobe()
703 op = container_of(p, struct optimized_kprobe, kp); in kill_optimized_kprobe()
707 op->kp.flags &= ~KPROBE_FLAG_OPTIMIZED; in kill_optimized_kprobe()
717 hlist_del_rcu(&op->kp.hlist); in kill_optimized_kprobe()
729 op = container_of(p, struct optimized_kprobe, kp); in prepare_optimized_kprobe()
743 op->kp.addr = p->addr; in alloc_aggr_kprobe()
746 return &op->kp; in alloc_aggr_kprobe()
772 op = container_of(ap, struct optimized_kprobe, kp); in try_to_optimize_kprobe()
983 static void arm_kprobe(struct kprobe *kp) in arm_kprobe() argument
985 if (unlikely(kprobe_ftrace(kp))) { in arm_kprobe()
986 arm_kprobe_ftrace(kp); in arm_kprobe()
995 __arm_kprobe(kp); in arm_kprobe()
1000 static void disarm_kprobe(struct kprobe *kp, bool reopt) in disarm_kprobe() argument
1002 if (unlikely(kprobe_ftrace(kp))) { in disarm_kprobe()
1003 disarm_kprobe_ftrace(kp); in disarm_kprobe()
1008 __disarm_kprobe(kp, reopt); in disarm_kprobe()
1018 struct kprobe *kp; in aggr_pre_handler() local
1020 list_for_each_entry_rcu(kp, &p->list, list) { in aggr_pre_handler()
1021 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in aggr_pre_handler()
1022 set_kprobe_instance(kp); in aggr_pre_handler()
1023 if (kp->pre_handler(kp, regs)) in aggr_pre_handler()
1035 struct kprobe *kp; in aggr_post_handler() local
1037 list_for_each_entry_rcu(kp, &p->list, list) { in aggr_post_handler()
1038 if (kp->post_handler && likely(!kprobe_disabled(kp))) { in aggr_post_handler()
1039 set_kprobe_instance(kp); in aggr_post_handler()
1040 kp->post_handler(kp, regs, flags); in aggr_post_handler()
1081 struct kprobe *kp; in kprobes_inc_nmissed_count() local
1085 list_for_each_entry_rcu(kp, &p->list, list) in kprobes_inc_nmissed_count()
1086 kp->nmissed++; in kprobes_inc_nmissed_count()
1588 struct kprobe *kp; in aggr_kprobe_disabled() local
1590 list_for_each_entry_rcu(kp, &ap->list, list) in aggr_kprobe_disabled()
1591 if (!kprobe_disabled(kp)) in aggr_kprobe_disabled()
1776 jp->kp.pre_handler = setjmp_pre_handler; in register_jprobes()
1777 jp->kp.break_handler = longjmp_break_handler; in register_jprobes()
1778 ret = register_kprobe(&jp->kp); in register_jprobes()
1812 if (__unregister_kprobe_top(&jps[i]->kp) < 0) in unregister_jprobes()
1813 jps[i]->kp.addr = NULL; in unregister_jprobes()
1818 if (jps[i]->kp.addr) in unregister_jprobes()
1819 __unregister_kprobe_bottom(&jps[i]->kp); in unregister_jprobes()
1831 struct kretprobe *rp = container_of(p, struct kretprobe, kp); in pre_handler_kretprobe()
1888 if (rp->kp.addr && check_kprobe_rereg(&rp->kp)) in register_kretprobe()
1892 addr = kprobe_addr(&rp->kp); in register_kretprobe()
1905 rp->kp.pre_handler = pre_handler_kretprobe; in register_kretprobe()
1906 rp->kp.post_handler = NULL; in register_kretprobe()
1907 rp->kp.fault_handler = NULL; in register_kretprobe()
1908 rp->kp.break_handler = NULL; in register_kretprobe()
1933 ret = register_kprobe(&rp->kp); in register_kretprobe()
1972 if (__unregister_kprobe_top(&rps[i]->kp) < 0) in unregister_kretprobes()
1973 rps[i]->kp.addr = NULL; in unregister_kretprobes()
1978 if (rps[i]->kp.addr) { in unregister_kretprobes()
1979 __unregister_kprobe_bottom(&rps[i]->kp); in unregister_kretprobes()
2020 struct kprobe *kp; in kill_kprobe() local
2031 list_for_each_entry_rcu(kp, &p->list, list) in kill_kprobe()
2032 kp->flags |= KPROBE_FLAG_GONE; in kill_kprobe()
2053 int disable_kprobe(struct kprobe *kp) in disable_kprobe() argument
2060 if (__disable_kprobe(kp) == NULL) in disable_kprobe()
2069 int enable_kprobe(struct kprobe *kp) in enable_kprobe() argument
2077 p = __get_valid_kprobe(kp); in enable_kprobe()
2083 if (kprobe_gone(kp)) { in enable_kprobe()
2089 if (p != kp) in enable_kprobe()
2090 kp->flags &= ~KPROBE_FLAG_DISABLED; in enable_kprobe()
2102 void dump_kprobe(struct kprobe *kp) in dump_kprobe() argument
2106 kp->symbol_name, kp->addr, kp->offset); in dump_kprobe()
2303 struct kprobe *p, *kp; in show_kprobe_addr() local
2315 list_for_each_entry_rcu(kp, &p->list, list) in show_kprobe_addr()
2316 report_probe(pi, kp, sym, offset, modname, p); in show_kprobe_addr()