Home
last modified time | relevance | path

Searched refs:kprobe_opcode_t (Results 1 – 25 of 44) sorted by relevance

12

/linux-6.12.1/arch/powerpc/include/asm/
Dkprobes.h32 typedef u32 kprobe_opcode_t; typedef
34 extern kprobe_opcode_t optinsn_slot;
37 extern kprobe_opcode_t optprobe_template_entry[];
38 extern kprobe_opcode_t optprobe_template_op_address[];
39 extern kprobe_opcode_t optprobe_template_call_handler[];
40 extern kprobe_opcode_t optprobe_template_insn[];
41 extern kprobe_opcode_t optprobe_template_call_emulate[];
42 extern kprobe_opcode_t optprobe_template_ret[];
43 extern kprobe_opcode_t optprobe_template_end[];
47 #define MAX_OPTIMIZED_LENGTH sizeof(kprobe_opcode_t) /* 4 bytes */
[all …]
/linux-6.12.1/arch/arm/include/asm/
Dkprobes.h24 typedef u32 kprobe_opcode_t; typedef
45 extern __visible kprobe_opcode_t optprobe_template_entry[];
46 extern __visible kprobe_opcode_t optprobe_template_val[];
47 extern __visible kprobe_opcode_t optprobe_template_call[];
48 extern __visible kprobe_opcode_t optprobe_template_end[];
49 extern __visible kprobe_opcode_t optprobe_template_sub_sp[];
50 extern __visible kprobe_opcode_t optprobe_template_add_sp[];
51 extern __visible kprobe_opcode_t optprobe_template_restore_begin[];
52 extern __visible kprobe_opcode_t optprobe_template_restore_orig_insn[];
53 extern __visible kprobe_opcode_t optprobe_template_restore_end[];
[all …]
/linux-6.12.1/arch/x86/include/asm/
Dkprobes.h26 typedef u8 kprobe_opcode_t; typedef
38 extern __visible kprobe_opcode_t optprobe_template_entry[];
39 extern __visible kprobe_opcode_t optprobe_template_clac[];
40 extern __visible kprobe_opcode_t optprobe_template_val[];
41 extern __visible kprobe_opcode_t optprobe_template_call[];
42 extern __visible kprobe_opcode_t optprobe_template_end[];
56 kprobe_opcode_t *insn;
87 kprobe_opcode_t copied_insn[DISP32_SIZE];
89 kprobe_opcode_t *insn;
/linux-6.12.1/arch/sh/kernel/
Dkprobes.c42 kprobe_opcode_t opcode = *p->addr; in arch_prepare_kprobe()
47 memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); in arch_prepare_kprobe()
57 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe()
64 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe()
83 struct kprobe *p = get_kprobe((kprobe_opcode_t *) pc + 1); in kprobe_handle_illslot()
141 __this_cpu_write(saved_current_opcode.addr, (kprobe_opcode_t *)regs->pc); in prepare_singlestep()
153 op1->addr = (kprobe_opcode_t *) regs->regs[reg_nr]; in prepare_singlestep()
157 (kprobe_opcode_t *) (regs->pc + 4 + disp * 2); in prepare_singlestep()
162 (kprobe_opcode_t *) (regs->pc + 4 + in prepare_singlestep()
166 op1->addr = (kprobe_opcode_t *) regs->pr; in prepare_singlestep()
[all …]
/linux-6.12.1/arch/arc/kernel/
Dkprobes.c42 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe()
50 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe()
63 sizeof(kprobe_opcode_t)); in arch_remove_kprobe()
73 sizeof(kprobe_opcode_t)); in arch_remove_kprobe()
107 sizeof(kprobe_opcode_t)); in resume_execution()
117 sizeof(kprobe_opcode_t)); in resume_execution()
139 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in setup_singlestep()
174 p->ainsn.t1_addr = (kprobe_opcode_t *) next_pc; in setup_singlestep()
180 sizeof(kprobe_opcode_t)); in setup_singlestep()
183 p->ainsn.t2_addr = (kprobe_opcode_t *) tgt_if_br; in setup_singlestep()
[all …]
/linux-6.12.1/include/linux/
Dkprobes.h43 typedef int kprobe_opcode_t; typedef
69 kprobe_opcode_t *addr;
84 kprobe_opcode_t opcode;
169 kprobe_opcode_t *ret_addr;
211 kprobe_opcode_t *correct_ret_addr);
279 extern int kprobe_on_func_entry(kprobe_opcode_t *addr, const char *sym, unsigned long offset);
296 extern kprobe_opcode_t *__get_insn_slot(struct kprobe_insn_cache *c);
298 kprobe_opcode_t *slot, int dirty);
306 static inline kprobe_opcode_t *get_##__name##_slot(void) \
311 static inline void free_##__name##_slot(kprobe_opcode_t *slot, int dirty)\
[all …]
/linux-6.12.1/arch/powerpc/kernel/
Dkprobes.c44 kprobe_opcode_t *kprobe_lookup_name(const char *name, unsigned int offset) in kprobe_lookup_name()
46 kprobe_opcode_t *addr = NULL; in kprobe_lookup_name()
50 addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); in kprobe_lookup_name()
61 addr = (kprobe_opcode_t *)faddr; in kprobe_lookup_name()
64 addr = (kprobe_opcode_t *)ppc_function_entry(addr); in kprobe_lookup_name()
96 addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); in kprobe_lookup_name()
100 addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); in kprobe_lookup_name()
102 addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); in kprobe_lookup_name()
122 kprobe_opcode_t *arch_adjust_kprobe_addr(unsigned long addr, unsigned long offset, in arch_adjust_kprobe_addr()
126 return (kprobe_opcode_t *)(addr + offset); in arch_adjust_kprobe_addr()
[all …]
Doptprobes.c59 if (p->addr == (kprobe_opcode_t *)&arch_rethook_trampoline) in can_optimize()
60 return addr + sizeof(kprobe_opcode_t); in can_optimize()
127 static void patch_imm32_load_insns(unsigned long val, int reg, kprobe_opcode_t *addr) in patch_imm32_load_insns()
137 static void patch_imm64_load_insns(unsigned long long val, int reg, kprobe_opcode_t *addr) in patch_imm64_load_insns()
146 static void patch_imm_load_insns(unsigned long val, int reg, kprobe_opcode_t *addr) in patch_imm_load_insns()
158 kprobe_opcode_t *buff; in arch_prepare_optimized_kprobe()
192 size = (TMPL_END_IDX * sizeof(kprobe_opcode_t)) / sizeof(int); in arch_prepare_optimized_kprobe()
300 int arch_within_optimized_kprobe(struct optimized_kprobe *op, kprobe_opcode_t *addr) in arch_within_optimized_kprobe()
303 op->kp.addr + (RELATIVEJUMP_SIZE / sizeof(kprobe_opcode_t)) > addr); in arch_within_optimized_kprobe()
/linux-6.12.1/arch/arm64/kernel/probes/
Ddecode-insn.c115 is_probed_address_atomic(kprobe_opcode_t *scan_start, kprobe_opcode_t *scan_end) in is_probed_address_atomic()
133 arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi) in arm_kprobe_decode_insn()
162 if (offset < (MAX_ATOMIC_CONTEXT_SIZE*sizeof(kprobe_opcode_t))) in arm_kprobe_decode_insn()
163 scan_end = addr - (offset / sizeof(kprobe_opcode_t)); in arm_kprobe_decode_insn()
Ddecode-insn.h18 #define MAX_ATOMIC_CONTEXT_SIZE (128 / sizeof(kprobe_opcode_t))
28 arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi);
/linux-6.12.1/arch/arc/include/asm/
Dkprobes.h13 typedef u16 kprobe_opcode_t; typedef
23 kprobe_opcode_t *t1_addr, *t2_addr;
24 kprobe_opcode_t t1_opcode, t2_opcode;
/linux-6.12.1/arch/parisc/include/asm/
Dkprobes.h26 typedef u32 kprobe_opcode_t; typedef
34 MAX_INSN_SIZE*sizeof(kprobe_opcode_t))
39 kprobe_opcode_t *insn;
/linux-6.12.1/arch/mips/include/asm/
Dkprobes.h28 typedef union mips_instruction kprobe_opcode_t; typedef
37 (MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \
49 kprobe_opcode_t *insn;
/linux-6.12.1/arch/loongarch/include/asm/
Dkprobes.h20 (MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \
25 typedef u32 kprobe_opcode_t; typedef
30 kprobe_opcode_t *insn;
/linux-6.12.1/arch/x86/kernel/kprobes/
Dcommon.h83 extern unsigned long recover_probed_instruction(kprobe_opcode_t *buf,
97 extern unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr);
103 static inline unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_optprobed_insn()
Dcore.c142 kprobe_opcode_t opcode; in can_boost()
205 __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_probed_insn()
239 MAX_INSN_SIZE * sizeof(kprobe_opcode_t))) in __recover_probed_insn()
255 unsigned long recover_probed_instruction(kprobe_opcode_t *buf, unsigned long addr) in recover_probed_instruction()
292 kprobe_opcode_t buf[MAX_INSN_SIZE]; in can_probe()
373 kprobe_opcode_t *arch_adjust_kprobe_addr(unsigned long addr, unsigned long offset, in arch_adjust_kprobe_addr()
394 return (kprobe_opcode_t *)(addr + offset); in arch_adjust_kprobe_addr()
406 kprobe_opcode_t buf[MAX_INSN_SIZE]; in __copy_instruction()
465 static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p, in prepare_singlestep()
759 kprobe_opcode_t buf[MAX_INSN_SIZE]; in arch_copy_kprobe()
[all …]
Dopt.c37 unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_optprobed_insn()
63 MAX_INSN_SIZE * sizeof(kprobe_opcode_t))) in __recover_optprobed_insn()
77 static void synthesize_clac(kprobe_opcode_t *addr) in synthesize_clac()
93 static void synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long val) in synthesize_set_arg1()
268 kprobe_opcode_t buf[MAX_INSN_SIZE]; in can_optimize()
357 kprobe_opcode_t *addr) in arch_within_optimized_kprobe()
Dftrace.c31 p = get_kprobe((kprobe_opcode_t *)ip); in kprobe_ftrace_handler()
41 regs->ip = ip + sizeof(kprobe_opcode_t); in kprobe_ftrace_handler()
/linux-6.12.1/arch/arm/probes/kprobes/
Dopt-arm.c184 kprobe_opcode_t *code; in NOKPROBE_SYMBOL()
236 TMPL_END_IDX * sizeof(kprobe_opcode_t)); in NOKPROBE_SYMBOL()
262 kprobe_opcode_t final_branch = arm_gen_branch( in NOKPROBE_SYMBOL()
348 kprobe_opcode_t *addr) in arch_within_optimized_kprobe()
351 op->kp.addr + (RELATIVEJUMP_SIZE / sizeof(kprobe_opcode_t)) > addr); in arch_within_optimized_kprobe()
Dcore.c50 kprobe_opcode_t insn; in arch_prepare_kprobe()
51 kprobe_opcode_t tmp_insn[MAX_INSN_SIZE]; in arch_prepare_kprobe()
134 kprobe_opcode_t insn = p->opcode; in arch_arm_kprobe()
250 p = get_kprobe((kprobe_opcode_t *)(regs->ARM_pc | 1)); in kprobe_handler()
252 p = get_kprobe((kprobe_opcode_t *)regs->ARM_pc); in kprobe_handler()
255 p = get_kprobe((kprobe_opcode_t *)regs->ARM_pc); in kprobe_handler()
423 ri->ret_addr = (kprobe_opcode_t *)regs->ARM_lr; in arch_prepare_kretprobe()
/linux-6.12.1/arch/mips/kernel/
Dkprobes.c127 memcpy(&p->ainsn.insn[0], p->addr + 1, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe()
129 memcpy(&p->ainsn.insn[0], p->addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe()
283 kprobe_opcode_t *addr; in kprobe_handler()
286 addr = (kprobe_opcode_t *) regs->cp0_epc; in kprobe_handler()
484 ri->ret_addr = (kprobe_opcode_t *) regs->regs[31]; in arch_prepare_kretprobe()
510 if (p->addr == (kprobe_opcode_t *)__kretprobe_trampoline) in arch_trampoline_kprobe()
518 .addr = (kprobe_opcode_t *)__kretprobe_trampoline,
/linux-6.12.1/arch/sh/include/asm/
Dkprobes.h14 typedef insn_size_t kprobe_opcode_t; typedef
34 kprobe_opcode_t insn[MAX_INSN_SIZE];
/linux-6.12.1/arch/sparc/include/asm/
Dkprobes.h14 typedef u32 kprobe_opcode_t; typedef
32 kprobe_opcode_t insn[MAX_INSN_SIZE];
/linux-6.12.1/arch/s390/include/asm/
Dkprobes.h42 typedef u16 kprobe_opcode_t; typedef
57 kprobe_opcode_t *insn;
/linux-6.12.1/arch/csky/kernel/probes/
Dftrace.c23 p = get_kprobe((kprobe_opcode_t *)ip); in kprobe_ftrace_handler()
25 p = get_kprobe((kprobe_opcode_t *)(ip - MCOUNT_INSN_SIZE)); in kprobe_ftrace_handler()

12