Lines Matching refs:rp
1218 struct kretprobe *rp = get_kretprobe(ri); in recycle_rp_inst() local
1220 if (likely(rp)) { in recycle_rp_inst()
1221 freelist_add(&ri->freelist, &rp->freelist); in recycle_rp_inst()
1276 static inline void free_rp_inst(struct kretprobe *rp) in free_rp_inst() argument
1282 node = rp->freelist.head; in free_rp_inst()
1291 if (refcount_sub_and_test(count, &rp->rph->ref)) { in free_rp_inst()
1292 kfree(rp->rph); in free_rp_inst()
1293 rp->rph = NULL; in free_rp_inst()
1883 struct kretprobe *rp; in __kretprobe_trampoline_handler() local
1917 rp = get_kretprobe(ri); in __kretprobe_trampoline_handler()
1918 if (rp && rp->handler) { in __kretprobe_trampoline_handler()
1921 __this_cpu_write(current_kprobe, &rp->kp); in __kretprobe_trampoline_handler()
1923 rp->handler(ri, regs); in __kretprobe_trampoline_handler()
1940 struct kretprobe *rp = container_of(p, struct kretprobe, kp); in NOKPROBE_SYMBOL() local
1944 fn = freelist_try_get(&rp->freelist); in NOKPROBE_SYMBOL()
1946 rp->nmissed++; in NOKPROBE_SYMBOL()
1952 if (rp->entry_handler && rp->entry_handler(ri, regs)) { in NOKPROBE_SYMBOL()
1953 freelist_add(&ri->freelist, &rp->freelist); in NOKPROBE_SYMBOL()
1999 int register_kretprobe(struct kretprobe *rp) in register_kretprobe() argument
2006 ret = kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset); in register_kretprobe()
2011 if (rp->kp.addr && warn_kprobe_rereg(&rp->kp)) in register_kretprobe()
2015 addr = kprobe_addr(&rp->kp); in register_kretprobe()
2025 if (rp->data_size > KRETPROBE_MAX_DATA_SIZE) in register_kretprobe()
2028 rp->kp.pre_handler = pre_handler_kretprobe; in register_kretprobe()
2029 rp->kp.post_handler = NULL; in register_kretprobe()
2032 if (rp->maxactive <= 0) { in register_kretprobe()
2034 rp->maxactive = max_t(unsigned int, 10, 2*num_possible_cpus()); in register_kretprobe()
2036 rp->maxactive = num_possible_cpus(); in register_kretprobe()
2039 rp->freelist.head = NULL; in register_kretprobe()
2040 rp->rph = kzalloc(sizeof(struct kretprobe_holder), GFP_KERNEL); in register_kretprobe()
2041 if (!rp->rph) in register_kretprobe()
2044 rcu_assign_pointer(rp->rph->rp, rp); in register_kretprobe()
2045 for (i = 0; i < rp->maxactive; i++) { in register_kretprobe()
2047 rp->data_size, GFP_KERNEL); in register_kretprobe()
2049 refcount_set(&rp->rph->ref, i); in register_kretprobe()
2050 free_rp_inst(rp); in register_kretprobe()
2053 inst->rph = rp->rph; in register_kretprobe()
2054 freelist_add(&inst->freelist, &rp->freelist); in register_kretprobe()
2056 refcount_set(&rp->rph->ref, i); in register_kretprobe()
2058 rp->nmissed = 0; in register_kretprobe()
2060 ret = register_kprobe(&rp->kp); in register_kretprobe()
2062 free_rp_inst(rp); in register_kretprobe()
2085 void unregister_kretprobe(struct kretprobe *rp) in unregister_kretprobe() argument
2087 unregister_kretprobes(&rp, 1); in unregister_kretprobe()
2101 rcu_assign_pointer(rps[i]->rph->rp, NULL); in unregister_kretprobes()
2116 int register_kretprobe(struct kretprobe *rp) in register_kretprobe() argument
2128 void unregister_kretprobe(struct kretprobe *rp) in unregister_kretprobe() argument