Lines Matching refs:kp
39 struct kprobe *kp; in __recover_optprobed_insn() local
44 kp = get_kprobe((void *)addr - i); in __recover_optprobed_insn()
46 if (kp && kprobe_optimized(kp)) { in __recover_optprobed_insn()
47 op = container_of(kp, struct optimized_kprobe, kp); in __recover_optprobed_insn()
65 if (addr == (unsigned long)kp->addr) { in __recover_optprobed_insn()
66 buf[0] = kp->opcode; in __recover_optprobed_insn()
69 offs = addr - (unsigned long)kp->addr - 1; in __recover_optprobed_insn()
174 if (kprobe_disabled(&op->kp)) in optimized_callback()
179 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
187 regs->ip = (unsigned long)op->kp.addr + INT3_INSN_SIZE; in optimized_callback()
190 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback()
192 opt_pre_handler(&op->kp, regs); in optimized_callback()
360 p = get_kprobe(op->kp.addr + i); in arch_check_optimized_kprobe()
372 return (op->kp.addr <= addr && in arch_within_optimized_kprobe()
373 op->kp.addr + op->optinsn.size > addr); in arch_within_optimized_kprobe()
411 if (!can_optimize((unsigned long)op->kp.addr)) in arch_prepare_optimized_kprobe()
428 rel = (long)slot - (long)op->kp.addr + JMP32_INSN_SIZE; in arch_prepare_optimized_kprobe()
438 ret = copy_optimized_instructions(buf + TMPL_END_IDX, op->kp.addr, in arch_prepare_optimized_kprobe()
456 (u8 *)op->kp.addr + op->optinsn.size); in arch_prepare_optimized_kprobe()
493 ((long)op->kp.addr + JMP32_INSN_SIZE)); in arch_optimize_kprobes()
495 WARN_ON(kprobe_disabled(&op->kp)); in arch_optimize_kprobes()
498 memcpy(op->optinsn.copied_insn, op->kp.addr + INT3_INSN_SIZE, in arch_optimize_kprobes()
504 text_poke_bp(op->kp.addr, insn_buff, JMP32_INSN_SIZE, NULL); in arch_optimize_kprobes()
521 u8 *addr = op->kp.addr; in arch_unoptimize_kprobe()
523 memcpy(old, op->kp.addr, JMP32_INSN_SIZE); in arch_unoptimize_kprobe()
535 perf_event_text_poke(op->kp.addr, old, JMP32_INSN_SIZE, new, JMP32_INSN_SIZE); in arch_unoptimize_kprobe()
559 op = container_of(p, struct optimized_kprobe, kp); in setup_detour_execution()