Lines Matching refs:kp
40 struct kprobe *kp; in __recover_optprobed_insn() local
45 kp = get_kprobe((void *)addr - i); in __recover_optprobed_insn()
47 if (kp && kprobe_optimized(kp)) { in __recover_optprobed_insn()
48 op = container_of(kp, struct optimized_kprobe, kp); in __recover_optprobed_insn()
66 if (addr == (unsigned long)kp->addr) { in __recover_optprobed_insn()
67 buf[0] = kp->opcode; in __recover_optprobed_insn()
70 offs = addr - (unsigned long)kp->addr - 1; in __recover_optprobed_insn()
175 if (kprobe_disabled(&op->kp)) in optimized_callback()
180 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
188 regs->ip = (unsigned long)op->kp.addr + INT3_INSN_SIZE; in optimized_callback()
191 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback()
193 opt_pre_handler(&op->kp, regs); in optimized_callback()
348 p = get_kprobe(op->kp.addr + i); in arch_check_optimized_kprobe()
360 return ((unsigned long)op->kp.addr <= addr && in arch_within_optimized_kprobe()
361 (unsigned long)op->kp.addr + op->optinsn.size > addr); in arch_within_optimized_kprobe()
399 if (!can_optimize((unsigned long)op->kp.addr)) in arch_prepare_optimized_kprobe()
416 rel = (long)slot - (long)op->kp.addr + JMP32_INSN_SIZE; in arch_prepare_optimized_kprobe()
426 ret = copy_optimized_instructions(buf + TMPL_END_IDX, op->kp.addr, in arch_prepare_optimized_kprobe()
444 (u8 *)op->kp.addr + op->optinsn.size); in arch_prepare_optimized_kprobe()
481 ((long)op->kp.addr + JMP32_INSN_SIZE)); in arch_optimize_kprobes()
483 WARN_ON(kprobe_disabled(&op->kp)); in arch_optimize_kprobes()
486 memcpy(op->optinsn.copied_insn, op->kp.addr + INT3_INSN_SIZE, in arch_optimize_kprobes()
492 text_poke_bp(op->kp.addr, insn_buff, JMP32_INSN_SIZE, NULL); in arch_optimize_kprobes()
509 u8 *addr = op->kp.addr; in arch_unoptimize_kprobe()
511 memcpy(old, op->kp.addr, JMP32_INSN_SIZE); in arch_unoptimize_kprobe()
523 perf_event_text_poke(op->kp.addr, old, JMP32_INSN_SIZE, new, JMP32_INSN_SIZE); in arch_unoptimize_kprobe()
547 op = container_of(p, struct optimized_kprobe, kp); in setup_detour_execution()