/linux-6.1.9/arch/powerpc/include/asm/ |
D | kprobes.h | 32 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.1.9/arch/arm/include/asm/ |
D | kprobes.h | 24 typedef u32 kprobe_opcode_t; typedef 47 extern __visible kprobe_opcode_t optprobe_template_entry[]; 48 extern __visible kprobe_opcode_t optprobe_template_val[]; 49 extern __visible kprobe_opcode_t optprobe_template_call[]; 50 extern __visible kprobe_opcode_t optprobe_template_end[]; 51 extern __visible kprobe_opcode_t optprobe_template_sub_sp[]; 52 extern __visible kprobe_opcode_t optprobe_template_add_sp[]; 53 extern __visible kprobe_opcode_t optprobe_template_restore_begin[]; 54 extern __visible kprobe_opcode_t optprobe_template_restore_orig_insn[]; 55 extern __visible kprobe_opcode_t optprobe_template_restore_end[]; [all …]
|
/linux-6.1.9/arch/x86/include/asm/ |
D | kprobes.h | 26 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.1.9/arch/sh/kernel/ |
D | kprobes.c | 42 kprobe_opcode_t opcode = *(kprobe_opcode_t *) (p->addr); in arch_prepare_kprobe() 54 memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); in arch_copy_kprobe() 62 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe() 69 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe() 88 struct kprobe *p = get_kprobe((kprobe_opcode_t *) pc + 1); in kprobe_handle_illslot() 146 __this_cpu_write(saved_current_opcode.addr, (kprobe_opcode_t *)regs->pc); in prepare_singlestep() 158 op1->addr = (kprobe_opcode_t *) regs->regs[reg_nr]; in prepare_singlestep() 162 (kprobe_opcode_t *) (regs->pc + 4 + disp * 2); in prepare_singlestep() 167 (kprobe_opcode_t *) (regs->pc + 4 + in prepare_singlestep() 171 op1->addr = (kprobe_opcode_t *) regs->pr; in prepare_singlestep() [all …]
|
/linux-6.1.9/arch/arc/kernel/ |
D | kprobes.c | 42 (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.1.9/arch/powerpc/kernel/ |
D | kprobes.c | 44 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 …]
|
D | optprobes.c | 59 if (p->addr == (kprobe_opcode_t *)&__kretprobe_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.1.9/include/linux/ |
D | kprobes.h | 44 typedef int kprobe_opcode_t; typedef 70 kprobe_opcode_t *addr; 85 kprobe_opcode_t opcode; 174 kprobe_opcode_t *ret_addr; 218 kprobe_opcode_t *correct_ret_addr); 298 extern int kprobe_on_func_entry(kprobe_opcode_t *addr, const char *sym, unsigned long offset); 315 extern kprobe_opcode_t *__get_insn_slot(struct kprobe_insn_cache *c); 317 kprobe_opcode_t *slot, int dirty); 325 static inline kprobe_opcode_t *get_##__name##_slot(void) \ 330 static inline void free_##__name##_slot(kprobe_opcode_t *slot, int dirty)\ [all …]
|
/linux-6.1.9/arch/arm64/kernel/probes/ |
D | decode-insn.c | 119 is_probed_address_atomic(kprobe_opcode_t *scan_start, kprobe_opcode_t *scan_end) in is_probed_address_atomic() 137 arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi) in arm_kprobe_decode_insn() 155 if (offset < (MAX_ATOMIC_CONTEXT_SIZE*sizeof(kprobe_opcode_t))) in arm_kprobe_decode_insn() 156 scan_end = addr - (offset / sizeof(kprobe_opcode_t)); in arm_kprobe_decode_insn()
|
D | decode-insn.h | 18 #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.1.9/arch/parisc/include/asm/ |
D | kprobes.h | 25 typedef u32 kprobe_opcode_t; typedef 33 MAX_INSN_SIZE*sizeof(kprobe_opcode_t)) 38 kprobe_opcode_t *insn;
|
/linux-6.1.9/arch/arc/include/asm/ |
D | kprobes.h | 13 typedef u16 kprobe_opcode_t; typedef 23 kprobe_opcode_t *t1_addr, *t2_addr; 24 kprobe_opcode_t t1_opcode, t2_opcode;
|
/linux-6.1.9/arch/mips/include/asm/ |
D | kprobes.h | 28 typedef union mips_instruction kprobe_opcode_t; typedef 37 (MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \ 49 kprobe_opcode_t *insn;
|
/linux-6.1.9/arch/x86/kernel/kprobes/ |
D | common.h | 83 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()
|
D | core.c | 141 kprobe_opcode_t opcode; in can_boost() 193 __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_probed_insn() 227 MAX_INSN_SIZE * sizeof(kprobe_opcode_t))) in __recover_probed_insn() 243 unsigned long recover_probed_instruction(kprobe_opcode_t *buf, unsigned long addr) in recover_probed_instruction() 259 kprobe_opcode_t buf[MAX_INSN_SIZE]; in can_probe() 301 kprobe_opcode_t *arch_adjust_kprobe_addr(unsigned long addr, unsigned long offset, in arch_adjust_kprobe_addr() 313 return (kprobe_opcode_t *)(addr + offset); in arch_adjust_kprobe_addr() 325 kprobe_opcode_t buf[MAX_INSN_SIZE]; in __copy_instruction() 384 static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p, in prepare_singlestep() 704 kprobe_opcode_t buf[MAX_INSN_SIZE]; in arch_copy_kprobe() [all …]
|
D | opt.c | 37 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() 288 kprobe_opcode_t buf[MAX_INSN_SIZE]; in can_optimize() 365 kprobe_opcode_t *addr) in arch_within_optimized_kprobe()
|
D | ftrace.c | 28 p = get_kprobe((kprobe_opcode_t *)ip); in kprobe_ftrace_handler() 38 regs->ip = ip + sizeof(kprobe_opcode_t); in kprobe_ftrace_handler()
|
/linux-6.1.9/arch/arm/probes/kprobes/ |
D | opt-arm.c | 186 kprobe_opcode_t *code; in NOKPROBE_SYMBOL() 238 TMPL_END_IDX * sizeof(kprobe_opcode_t)); in NOKPROBE_SYMBOL() 264 kprobe_opcode_t final_branch = arm_gen_branch( in NOKPROBE_SYMBOL() 350 kprobe_opcode_t *addr) in arch_within_optimized_kprobe() 353 op->kp.addr + (RELATIVEJUMP_SIZE / sizeof(kprobe_opcode_t)) > addr); in arch_within_optimized_kprobe()
|
D | core.c | 50 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.1.9/arch/mips/kernel/ |
D | kprobes.c | 127 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.1.9/arch/ia64/kernel/ |
D | kprobes.c | 413 ri->ret_addr = (kprobe_opcode_t *)regs->b0; in arch_prepare_kretprobe() 500 bundle = &((kprobe_opcode_t *)kprobe_addr)->bundle; in arch_prepare_kprobe() 520 memcpy(&p->opcode, kprobe_addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() 521 memcpy(p->ainsn.insn, kprobe_addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() 536 dest = &((kprobe_opcode_t *)arm_addr)->bundle; in arch_arm_kprobe() 541 sizeof(kprobe_opcode_t) * MAX_INSN_SIZE); in arch_arm_kprobe() 554 flush_icache_range(arm_addr, arm_addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe() 563 dest = &((kprobe_opcode_t *)arm_addr)->bundle; in arch_disarm_kprobe() 577 flush_icache_range(arm_addr, arm_addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe() 700 kprobe_opcode_t *addr = (kprobe_opcode_t *)instruction_pointer(regs); in pre_kprobes_handler()
|
/linux-6.1.9/arch/sh/include/asm/ |
D | kprobes.h | 14 typedef insn_size_t kprobe_opcode_t; typedef 34 kprobe_opcode_t insn[MAX_INSN_SIZE];
|
/linux-6.1.9/arch/sparc/include/asm/ |
D | kprobes.h | 14 typedef u32 kprobe_opcode_t; typedef 32 kprobe_opcode_t insn[MAX_INSN_SIZE];
|
/linux-6.1.9/arch/s390/include/asm/ |
D | kprobes.h | 41 typedef u16 kprobe_opcode_t; typedef 56 kprobe_opcode_t *insn;
|
/linux-6.1.9/arch/ia64/include/asm/ |
D | kprobes.h | 94 } kprobe_opcode_t; typedef 99 kprobe_opcode_t *insn;
|