/Linux-v4.19/arch/powerpc/include/asm/ |
D | kprobes.h | 45 typedef ppc_opcode_t kprobe_opcode_t; typedef 47 extern kprobe_opcode_t optinsn_slot; 50 extern kprobe_opcode_t optprobe_template_entry[]; 51 extern kprobe_opcode_t optprobe_template_op_address[]; 52 extern kprobe_opcode_t optprobe_template_call_handler[]; 53 extern kprobe_opcode_t optprobe_template_insn[]; 54 extern kprobe_opcode_t optprobe_template_call_emulate[]; 55 extern kprobe_opcode_t optprobe_template_ret[]; 56 extern kprobe_opcode_t optprobe_template_end[]; 60 #define MAX_OPTIMIZED_LENGTH sizeof(kprobe_opcode_t) /* 4 bytes */ [all …]
|
/Linux-v4.19/arch/arm/include/asm/ |
D | kprobes.h | 32 typedef u32 kprobe_opcode_t; typedef 55 extern __visible kprobe_opcode_t optprobe_template_entry; 56 extern __visible kprobe_opcode_t optprobe_template_val; 57 extern __visible kprobe_opcode_t optprobe_template_call; 58 extern __visible kprobe_opcode_t optprobe_template_end; 59 extern __visible kprobe_opcode_t optprobe_template_sub_sp; 60 extern __visible kprobe_opcode_t optprobe_template_add_sp; 61 extern __visible kprobe_opcode_t optprobe_template_restore_begin; 62 extern __visible kprobe_opcode_t optprobe_template_restore_orig_insn; 63 extern __visible kprobe_opcode_t optprobe_template_restore_end; [all …]
|
/Linux-v4.19/arch/x86/include/asm/ |
D | kprobes.h | 40 typedef u8 kprobe_opcode_t; typedef 55 extern __visible kprobe_opcode_t optprobe_template_entry[]; 56 extern __visible kprobe_opcode_t optprobe_template_val[]; 57 extern __visible kprobe_opcode_t optprobe_template_call[]; 58 extern __visible kprobe_opcode_t optprobe_template_end[]; 75 kprobe_opcode_t *insn; 89 kprobe_opcode_t copied_insn[RELATIVE_ADDR_SIZE]; 91 kprobe_opcode_t *insn;
|
/Linux-v4.19/arch/sh/kernel/ |
D | kprobes.c | 45 kprobe_opcode_t opcode = *(kprobe_opcode_t *) (p->addr); in arch_prepare_kprobe() 57 memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); in arch_copy_kprobe() 65 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe() 72 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe() 91 struct kprobe *p = get_kprobe((kprobe_opcode_t *) pc + 1); in kprobe_handle_illslot() 149 __this_cpu_write(saved_current_opcode.addr, (kprobe_opcode_t *)regs->pc); in prepare_singlestep() 161 op1->addr = (kprobe_opcode_t *) regs->regs[reg_nr]; in prepare_singlestep() 165 (kprobe_opcode_t *) (regs->pc + 4 + disp * 2); in prepare_singlestep() 170 (kprobe_opcode_t *) (regs->pc + 4 + in prepare_singlestep() 174 op1->addr = (kprobe_opcode_t *) regs->pr; in prepare_singlestep() [all …]
|
/Linux-v4.19/arch/powerpc/kernel/ |
D | kprobes.c | 54 kprobe_opcode_t *kprobe_lookup_name(const char *name, unsigned int offset) in kprobe_lookup_name() 56 kprobe_opcode_t *addr = NULL; in kprobe_lookup_name() 60 addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); in kprobe_lookup_name() 71 addr = (kprobe_opcode_t *)faddr; in kprobe_lookup_name() 74 addr = (kprobe_opcode_t *)ppc_function_entry(addr); in kprobe_lookup_name() 106 addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); in kprobe_lookup_name() 110 addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); in kprobe_lookup_name() 112 addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); in kprobe_lookup_name() 121 kprobe_opcode_t insn = *p->addr; in arch_prepare_kprobe() 141 MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() [all …]
|
D | optprobes.c | 78 if (p->addr == (kprobe_opcode_t *)&kretprobe_trampoline) in can_optimize() 79 return (unsigned long)p->addr + sizeof(kprobe_opcode_t); in can_optimize() 151 void patch_imm32_load_insns(unsigned int val, kprobe_opcode_t *addr) in patch_imm32_load_insns() 167 void patch_imm64_load_insns(unsigned long val, kprobe_opcode_t *addr) in patch_imm64_load_insns() 196 kprobe_opcode_t *buff, branch_op_callback, branch_emulate_step; in arch_prepare_optimized_kprobe() 197 kprobe_opcode_t *op_callback_addr, *emulate_step_addr; in arch_prepare_optimized_kprobe() 234 size = (TMPL_END_IDX * sizeof(kprobe_opcode_t)) / sizeof(int); in arch_prepare_optimized_kprobe() 251 op_callback_addr = (kprobe_opcode_t *)ppc_kallsyms_lookup_name("optimized_callback"); in arch_prepare_optimized_kprobe() 252 emulate_step_addr = (kprobe_opcode_t *)ppc_kallsyms_lookup_name("emulate_step"); in arch_prepare_optimized_kprobe()
|
/Linux-v4.19/arch/arc/kernel/ |
D | kprobes.c | 45 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe() 53 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe() 66 sizeof(kprobe_opcode_t)); in arch_remove_kprobe() 76 sizeof(kprobe_opcode_t)); in arch_remove_kprobe() 110 sizeof(kprobe_opcode_t)); in resume_execution() 120 sizeof(kprobe_opcode_t)); in resume_execution() 142 (unsigned long)p->addr + sizeof(kprobe_opcode_t)); in setup_singlestep() 177 p->ainsn.t1_addr = (kprobe_opcode_t *) next_pc; in setup_singlestep() 183 sizeof(kprobe_opcode_t)); in setup_singlestep() 186 p->ainsn.t2_addr = (kprobe_opcode_t *) tgt_if_br; in setup_singlestep() [all …]
|
/Linux-v4.19/include/linux/ |
D | kprobes.h | 55 typedef int kprobe_opcode_t; typedef 83 kprobe_opcode_t *addr; 104 kprobe_opcode_t opcode; 174 kprobe_opcode_t *ret_addr; 246 extern bool kprobe_on_func_entry(kprobe_opcode_t *addr, const char *sym, unsigned long offset); 260 extern kprobe_opcode_t *__get_insn_slot(struct kprobe_insn_cache *c); 262 kprobe_opcode_t *slot, int dirty); 270 static inline kprobe_opcode_t *get_##__name##_slot(void) \ 275 static inline void free_##__name##_slot(kprobe_opcode_t *slot, int dirty)\ 362 kprobe_opcode_t *kprobe_lookup_name(const char *name, unsigned int offset);
|
/Linux-v4.19/arch/arm64/kernel/probes/ |
D | decode-insn.c | 124 is_probed_address_atomic(kprobe_opcode_t *scan_start, kprobe_opcode_t *scan_end) in is_probed_address_atomic() 142 arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi) in arm_kprobe_decode_insn() 160 if (offset < (MAX_ATOMIC_CONTEXT_SIZE*sizeof(kprobe_opcode_t))) in arm_kprobe_decode_insn() 161 scan_end = addr - (offset / sizeof(kprobe_opcode_t)); in arm_kprobe_decode_insn()
|
D | decode-insn.h | 26 #define MAX_ATOMIC_CONTEXT_SIZE (128 / sizeof(kprobe_opcode_t)) 36 arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi);
|
D | kprobes.c | 52 MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); in arch_prepare_ss_slot() 58 sizeof(kprobe_opcode_t); in arch_prepare_ss_slot() 121 static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode) in patch_text() 224 kcb->ss_ctx.match_addr = addr + sizeof(kprobe_opcode_t); in set_ss_context() 384 p = get_kprobe((kprobe_opcode_t *) addr); in kprobe_handler() 490 kprobe_opcode_t *correct_ret_addr = NULL; in trampoline_probe_handler() 564 ri->ret_addr = (kprobe_opcode_t *)regs->regs[30]; in arch_prepare_kretprobe()
|
/Linux-v4.19/arch/x86/kernel/kprobes/ |
D | core.c | 149 static kprobe_opcode_t *skip_prefixes(kprobe_opcode_t *insn) in skip_prefixes() 172 kprobe_opcode_t opcode; in can_boost() 218 __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_probed_insn() 259 MAX_INSN_SIZE * sizeof(kprobe_opcode_t))) in __recover_probed_insn() 275 unsigned long recover_probed_instruction(kprobe_opcode_t *buf, unsigned long addr) in recover_probed_instruction() 291 kprobe_opcode_t buf[MAX_INSN_SIZE]; in can_probe() 328 static int is_IF_modifier(kprobe_opcode_t *insn) in is_IF_modifier() 353 kprobe_opcode_t buf[MAX_INSN_SIZE]; in __copy_instruction() 406 static int prepare_boost(kprobe_opcode_t *buf, struct kprobe *p, in prepare_boost() 451 kprobe_opcode_t buf[MAX_INSN_SIZE]; in arch_copy_kprobe() [all …]
|
D | common.h | 82 extern unsigned long recover_probed_instruction(kprobe_opcode_t *buf, 96 extern unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr); 102 static inline unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_optprobed_insn()
|
D | ftrace.c | 36 p = get_kprobe((kprobe_opcode_t *)ip); in kprobe_ftrace_handler() 46 regs->ip = ip + sizeof(kprobe_opcode_t); in kprobe_ftrace_handler()
|
D | opt.c | 47 unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr) in __recover_optprobed_insn() 73 MAX_INSN_SIZE * sizeof(kprobe_opcode_t))) in __recover_optprobed_insn() 88 static void synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long val) in synthesize_set_arg1() 152 #define INT3_SIZE sizeof(kprobe_opcode_t) 266 kprobe_opcode_t buf[MAX_INSN_SIZE]; in can_optimize()
|
/Linux-v4.19/arch/arc/include/asm/ |
D | kprobes.h | 16 typedef u16 kprobe_opcode_t; typedef 26 kprobe_opcode_t *t1_addr, *t2_addr; 27 kprobe_opcode_t t1_opcode, t2_opcode;
|
/Linux-v4.19/arch/mips/include/asm/ |
D | kprobes.h | 40 typedef union mips_instruction kprobe_opcode_t; typedef 49 (MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \ 60 kprobe_opcode_t *insn;
|
/Linux-v4.19/arch/arm/probes/kprobes/ |
D | core.c | 56 kprobe_opcode_t insn; in arch_prepare_kprobe() 57 kprobe_opcode_t tmp_insn[MAX_INSN_SIZE]; in arch_prepare_kprobe() 140 kprobe_opcode_t insn = p->opcode; in arch_arm_kprobe() 256 p = get_kprobe((kprobe_opcode_t *)(regs->ARM_pc | 1)); in kprobe_handler() 258 p = get_kprobe((kprobe_opcode_t *)regs->ARM_pc); in kprobe_handler() 261 p = get_kprobe((kprobe_opcode_t *)regs->ARM_pc); in kprobe_handler() 429 kprobe_opcode_t *correct_ret_addr = NULL; in trampoline_handler() 504 ri->ret_addr = (kprobe_opcode_t *)regs->ARM_lr; in arch_prepare_kretprobe()
|
D | opt-arm.c | 199 kprobe_opcode_t *code; in NOKPROBE_SYMBOL() 251 TMPL_END_IDX * sizeof(kprobe_opcode_t)); in NOKPROBE_SYMBOL() 277 kprobe_opcode_t final_branch = arm_gen_branch( in NOKPROBE_SYMBOL()
|
/Linux-v4.19/arch/ia64/kernel/ |
D | kprobes.c | 500 ri->ret_addr = (kprobe_opcode_t *)regs->b0; in arch_prepare_kretprobe() 586 bundle = &((kprobe_opcode_t *)kprobe_addr)->bundle; in arch_prepare_kprobe() 606 memcpy(&p->opcode, kprobe_addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() 607 memcpy(p->ainsn.insn, kprobe_addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() 622 dest = &((kprobe_opcode_t *)arm_addr)->bundle; in arch_arm_kprobe() 627 sizeof(kprobe_opcode_t) * MAX_INSN_SIZE); in arch_arm_kprobe() 640 flush_icache_range(arm_addr, arm_addr + sizeof(kprobe_opcode_t)); in arch_arm_kprobe() 649 dest = &((kprobe_opcode_t *)arm_addr)->bundle; in arch_disarm_kprobe() 663 flush_icache_range(arm_addr, arm_addr + sizeof(kprobe_opcode_t)); in arch_disarm_kprobe() 786 kprobe_opcode_t *addr = (kprobe_opcode_t *)instruction_pointer(regs); in pre_kprobes_handler() [all …]
|
/Linux-v4.19/arch/mips/kernel/ |
D | kprobes.c | 136 memcpy(&p->ainsn.insn[0], p->addr + 1, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() 138 memcpy(&p->ainsn.insn[0], p->addr, sizeof(kprobe_opcode_t)); in arch_prepare_kprobe() 289 kprobe_opcode_t *addr; in kprobe_handler() 292 addr = (kprobe_opcode_t *) regs->cp0_epc; in kprobe_handler() 491 ri->ret_addr = (kprobe_opcode_t *) regs->regs[31]; in arch_prepare_kretprobe() 564 if (p->addr == (kprobe_opcode_t *)kretprobe_trampoline) in arch_trampoline_kprobe() 571 .addr = (kprobe_opcode_t *)kretprobe_trampoline,
|
/Linux-v4.19/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-v4.19/arch/sparc/include/asm/ |
D | kprobes.h | 14 typedef u32 kprobe_opcode_t; typedef 32 kprobe_opcode_t insn[MAX_INSN_SIZE];
|
/Linux-v4.19/arch/s390/include/asm/ |
D | kprobes.h | 41 typedef u16 kprobe_opcode_t; typedef 56 kprobe_opcode_t *insn;
|
/Linux-v4.19/arch/ia64/include/asm/ |
D | kprobes.h | 107 } kprobe_opcode_t; typedef 112 kprobe_opcode_t *insn;
|