Home
last modified time | relevance | path

Searched refs:ainsn (Results 1 – 23 of 23) sorted by relevance

/kernel/linux/linux-5.10/arch/arc/kernel/
Dkprobes.c31 p->ainsn.is_short = is_short_instr((unsigned long)p->addr); in arch_prepare_kprobe()
58 if (p->ainsn.t1_addr) { in arch_remove_kprobe()
59 *(p->ainsn.t1_addr) = p->ainsn.t1_opcode; in arch_remove_kprobe()
61 flush_icache_range((unsigned long)p->ainsn.t1_addr, in arch_remove_kprobe()
62 (unsigned long)p->ainsn.t1_addr + in arch_remove_kprobe()
65 p->ainsn.t1_addr = NULL; in arch_remove_kprobe()
68 if (p->ainsn.t2_addr) { in arch_remove_kprobe()
69 *(p->ainsn.t2_addr) = p->ainsn.t2_opcode; in arch_remove_kprobe()
71 flush_icache_range((unsigned long)p->ainsn.t2_addr, in arch_remove_kprobe()
72 (unsigned long)p->ainsn.t2_addr + in arch_remove_kprobe()
[all …]
/kernel/linux/linux-5.10/arch/ia64/kernel/
Dkprobes.c90 p->ainsn.inst_flag = 0; in update_kprobe_inst_flag()
91 p->ainsn.target_br_reg = 0; in update_kprobe_inst_flag()
92 p->ainsn.slot = slot; in update_kprobe_inst_flag()
101 p->ainsn.inst_flag |= INST_FLAG_BREAK_INST; in update_kprobe_inst_flag()
108 p->ainsn.inst_flag |= INST_FLAG_FIX_BRANCH_REG; in update_kprobe_inst_flag()
109 p->ainsn.target_br_reg = ((kprobe_inst >> 6) & 0x7); in update_kprobe_inst_flag()
113 p->ainsn.inst_flag |= INST_FLAG_FIX_RELATIVE_IP_ADDR; in update_kprobe_inst_flag()
116 p->ainsn.inst_flag |= INST_FLAG_FIX_RELATIVE_IP_ADDR; in update_kprobe_inst_flag()
117 p->ainsn.inst_flag |= INST_FLAG_FIX_BRANCH_REG; in update_kprobe_inst_flag()
118 p->ainsn.target_br_reg = ((kprobe_inst >> 6) & 0x7); in update_kprobe_inst_flag()
[all …]
/kernel/linux/linux-5.10/arch/arm/probes/kprobes/
Dcore.c83 p->ainsn.insn = tmp_insn; in arch_prepare_kprobe()
85 switch ((*decode_insn)(insn, &p->ainsn, true, actions, checkers)) { in arch_prepare_kprobe()
90 p->ainsn.insn = get_insn_slot(); in arch_prepare_kprobe()
91 if (!p->ainsn.insn) in arch_prepare_kprobe()
94 p->ainsn.insn[is] = tmp_insn[is]; in arch_prepare_kprobe()
95 flush_insns(p->ainsn.insn, in arch_prepare_kprobe()
96 sizeof(p->ainsn.insn[0]) * MAX_INSN_SIZE); in arch_prepare_kprobe()
97 p->ainsn.insn_fn = (probes_insn_fn_t *) in arch_prepare_kprobe()
98 ((uintptr_t)p->ainsn.insn | thumb); in arch_prepare_kprobe()
102 p->ainsn.insn = NULL; in arch_prepare_kprobe()
[all …]
Dopt-arm.c127 if (kp->ainsn.stack_space < 0) in can_optimize()
133 if (kp->ainsn.stack_space > 255 - sizeof(struct pt_regs)) in can_optimize()
177 if (!p->ainsn.kprobe_direct_exec) in optimized_callback()
178 op->kp.ainsn.insn_singlestep(p->opcode, &p->ainsn, regs); in optimized_callback()
241 BUG_ON(orig->ainsn.stack_space < 0); in NOKPROBE_SYMBOL()
243 stack_protect += orig->ainsn.stack_space; in NOKPROBE_SYMBOL()
262 orig->ainsn.kprobe_direct_exec = false; in NOKPROBE_SYMBOL()
263 if (can_kprobe_direct_exec(orig->ainsn.register_usage_flags)) { in NOKPROBE_SYMBOL()
279 orig->ainsn.kprobe_direct_exec = true; in NOKPROBE_SYMBOL()
/kernel/linux/linux-5.10/arch/powerpc/kernel/
Dkprobes.c127 ppc_inst_prefixed(ppc_inst_read((struct ppc_inst *)prev->ainsn.insn))) { in arch_prepare_kprobe()
135 p->ainsn.insn = get_insn_slot(); in arch_prepare_kprobe()
136 if (!p->ainsn.insn) in arch_prepare_kprobe()
141 patch_instruction((struct ppc_inst *)p->ainsn.insn, insn); in arch_prepare_kprobe()
145 p->ainsn.boostable = 0; in arch_prepare_kprobe()
164 if (p->ainsn.insn) { in arch_remove_kprobe()
165 free_insn_slot(p->ainsn.insn, 0); in arch_remove_kprobe()
166 p->ainsn.insn = NULL; in arch_remove_kprobe()
181 regs->nip = (unsigned long)p->ainsn.insn; in prepare_singlestep()
231 struct ppc_inst insn = ppc_inst_read((struct ppc_inst *)p->ainsn.insn); in try_to_emulate()
[all …]
Dkprobes-ftrace.c60 p->ainsn.insn = NULL; in arch_prepare_kprobe_ftrace()
61 p->ainsn.boostable = -1; in arch_prepare_kprobe_ftrace()
Doptprobes.c103 if (!is_conditional_branch(ppc_inst_read((struct ppc_inst *)p->ainsn.insn)) && in can_optimize()
105 ppc_inst_read((struct ppc_inst *)p->ainsn.insn)) == 1) { in can_optimize()
285 temp = ppc_inst_read((struct ppc_inst *)p->ainsn.insn); in arch_prepare_optimized_kprobe()
/kernel/linux/linux-5.10/arch/csky/kernel/probes/
Dkprobes.c56 p->ainsn.api.restore = (unsigned long)p->addr + offset; in arch_prepare_ss_slot()
58 patch_text(p->ainsn.api.insn, p->opcode); in arch_prepare_ss_slot()
63 p->ainsn.api.restore = 0; in arch_prepare_simulate()
70 if (p->ainsn.api.handler) in arch_simulate_insn()
71 p->ainsn.api.handler((u32)p->opcode, (long)p->addr, regs); in arch_simulate_insn()
89 switch (csky_probe_decode_insn(p->addr, &p->ainsn.api)) { in arch_prepare_kprobe()
94 p->ainsn.api.insn = NULL; in arch_prepare_kprobe()
98 p->ainsn.api.insn = get_insn_slot(); in arch_prepare_kprobe()
99 if (!p->ainsn.api.insn) in arch_prepare_kprobe()
105 if (p->ainsn.api.insn) in arch_prepare_kprobe()
[all …]
Dftrace.c64 p->ainsn.api.insn = NULL; in arch_prepare_kprobe_ftrace()
/kernel/linux/linux-5.10/arch/arm64/kernel/probes/
Dkprobes.c41 kprobe_opcode_t *addr = p->ainsn.api.insn; in arch_prepare_ss_slot()
53 p->ainsn.api.restore = (unsigned long) p->addr + in arch_prepare_ss_slot()
60 p->ainsn.api.restore = 0; in arch_prepare_simulate()
67 if (p->ainsn.api.handler) in arch_simulate_insn()
68 p->ainsn.api.handler((u32)p->opcode, (long)p->addr, regs); in arch_simulate_insn()
88 switch (arm_kprobe_decode_insn(p->addr, &p->ainsn)) { in arch_prepare_kprobe()
93 p->ainsn.api.insn = NULL; in arch_prepare_kprobe()
97 p->ainsn.api.insn = get_insn_slot(); in arch_prepare_kprobe()
98 if (!p->ainsn.api.insn) in arch_prepare_kprobe()
104 if (p->ainsn.api.insn) in arch_prepare_kprobe()
[all …]
/kernel/linux/linux-5.10/arch/x86/kernel/kprobes/
Dcore.c427 synthesize_reljump(buf + len, p->ainsn.insn + len, in prepare_boost()
430 p->ainsn.boostable = true; in prepare_boost()
432 p->ainsn.boostable = false; in prepare_boost()
476 len = __copy_instruction(buf, p->addr, p->ainsn.insn, &insn); in arch_copy_kprobe()
487 p->ainsn.if_modifier = is_IF_modifier(buf); in arch_copy_kprobe()
492 p->ainsn.tp_len = len; in arch_copy_kprobe()
493 perf_event_text_poke(p->ainsn.insn, NULL, 0, buf, len); in arch_copy_kprobe()
496 text_poke(p->ainsn.insn, buf, len); in arch_copy_kprobe()
511 p->ainsn.insn = get_insn_slot(); in arch_prepare_kprobe()
512 if (!p->ainsn.insn) in arch_prepare_kprobe()
[all …]
Dftrace.c60 p->ainsn.insn = NULL; in arch_prepare_kprobe_ftrace()
61 p->ainsn.boostable = false; in arch_prepare_kprobe_ftrace()
/kernel/linux/linux-5.10/arch/s390/kernel/
Dkprobes.c92 new_addr = (u64)(unsigned long)p->ainsn.insn; in copy_instruction()
96 s390_kernel_write(p->ainsn.insn, &insn, len); in copy_instruction()
112 p->ainsn.insn = NULL; in s390_get_insn_slot()
114 p->ainsn.insn = get_s390_insn_slot(); in s390_get_insn_slot()
116 p->ainsn.insn = get_insn_slot(); in s390_get_insn_slot()
117 return p->ainsn.insn ? 0 : -ENOMEM; in s390_get_insn_slot()
123 if (!p->ainsn.insn) in s390_free_insn_slot()
126 free_s390_insn_slot(p->ainsn.insn, 0); in s390_free_insn_slot()
128 free_insn_slot(p->ainsn.insn, 0); in s390_free_insn_slot()
129 p->ainsn.insn = NULL; in s390_free_insn_slot()
[all …]
Dftrace.c238 p->ainsn.insn = NULL; in arch_prepare_kprobe_ftrace()
/kernel/linux/linux-5.10/arch/parisc/kernel/
Dkprobes.c24 p->ainsn.insn = get_insn_slot(); in arch_prepare_kprobe()
25 if (!p->ainsn.insn) in arch_prepare_kprobe()
28 memcpy(p->ainsn.insn, p->addr, in arch_prepare_kprobe()
37 if (!p->ainsn.insn) in arch_remove_kprobe()
40 free_insn_slot(p->ainsn.insn, 0); in arch_remove_kprobe()
41 p->ainsn.insn = NULL; in arch_remove_kprobe()
76 regs->iaoq[0] = (unsigned long)p->ainsn.insn; in setup_singlestep()
139 if (regs->iaoq[0] != (unsigned long)p->ainsn.insn+4) in parisc_kprobe_ss_handler()
Dftrace.c243 p->ainsn.insn = NULL; in arch_prepare_kprobe_ftrace()
/kernel/linux/linux-5.10/arch/mips/kernel/
Dkprobes.c104 p->ainsn.insn = get_insn_slot(); in arch_prepare_kprobe()
105 if (!p->ainsn.insn) { in arch_prepare_kprobe()
124 memcpy(&p->ainsn.insn[0], p->addr + 1, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe()
126 memcpy(&p->ainsn.insn[0], p->addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe()
128 p->ainsn.insn[1] = breakpoint2_insn; in arch_prepare_kprobe()
149 if (p->ainsn.insn) { in arch_remove_kprobe()
150 free_insn_slot(p->ainsn.insn, 0); in arch_remove_kprobe()
151 p->ainsn.insn = NULL; in arch_remove_kprobe()
205 if (p->ainsn.insn->word == 0) in evaluate_branch_instruction()
246 regs->cp0_epc = (unsigned long)&p->ainsn.insn[0]; in prepare_singlestep()
[all …]
/kernel/linux/linux-5.10/arch/sparc/kernel/
Dkprobes.c55 p->ainsn.insn[0] = *p->addr; in arch_prepare_kprobe()
56 flushi(&p->ainsn.insn[0]); in arch_prepare_kprobe()
58 p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2; in arch_prepare_kprobe()
59 flushi(&p->ainsn.insn[1]); in arch_prepare_kprobe()
111 regs->tpc = (unsigned long) &p->ainsn.insn[0]; in prepare_singlestep()
112 regs->tnpc = (unsigned long) &p->ainsn.insn[1]; in prepare_singlestep()
218 ainsn_addr = (unsigned long) &p->ainsn.insn[0]; in relbranch_fixup()
280 u32 insn = p->ainsn.insn[0]; in resume_execution()
/kernel/linux/linux-5.10/arch/parisc/include/asm/
Dkprobes.h30 flush_icache_range((unsigned long)&(p)->ainsn.insn[0], \
31 (unsigned long)&(p)->ainsn.insn[0] + \
/kernel/linux/linux-5.10/arch/sparc/include/asm/
Dkprobes.h23 do { flushi(&(p)->ainsn.insn[0]); \
24 flushi(&(p)->ainsn.insn[1]); \
/kernel/linux/linux-5.10/arch/sh/kernel/
Dkprobes.c54 memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); in arch_copy_kprobe()
234 *p->ainsn.insn == BREAKPOINT_INSTRUCTION) { in kprobe_handler()
/kernel/linux/linux-5.10/include/linux/
Dkprobes.h94 struct arch_specific_insn ainsn; member
/kernel/linux/linux-5.10/kernel/
Dkprobes.c401 memcpy(&p->ainsn, &ap->ainsn, sizeof(struct arch_specific_insn)); in copy_kprobe()