/Linux-v4.19/arch/x86/kernel/ |
D | uprobes.c | 289 static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool x86_64) in uprobe_init_insn() argument 293 insn_init(insn, auprobe->insn, sizeof(auprobe->insn), x86_64); in uprobe_init_insn() 347 static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) in riprel_analyze() argument 362 cursor = auprobe->insn + insn_offset_rex_prefix(insn); in riprel_analyze() 381 cursor = auprobe->insn + insn_offset_vex_prefix(insn) + 1; in riprel_analyze() 445 auprobe->defparam.fixups |= UPROBE_FIX_RIP_SI; in riprel_analyze() 448 auprobe->defparam.fixups |= UPROBE_FIX_RIP_DI; in riprel_analyze() 452 auprobe->defparam.fixups |= UPROBE_FIX_RIP_BX; in riprel_analyze() 459 cursor = auprobe->insn + insn_offset_modrm(insn); in riprel_analyze() 469 scratch_reg(struct arch_uprobe *auprobe, struct pt_regs *regs) in scratch_reg() argument [all …]
|
/Linux-v4.19/arch/arm/probes/uprobes/ |
D | core.c | 32 int set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, in set_swbp() argument 35 return uprobe_write_opcode(auprobe, mm, vaddr, in set_swbp() 36 __opcode_to_mem_arm(auprobe->bpinsn)); in set_swbp() 39 bool arch_uprobe_ignore(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_ignore() argument 41 if (!auprobe->asi.insn_check_cc(regs->ARM_cpsr)) { in arch_uprobe_ignore() 49 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 53 if (!auprobe->simulate) in arch_uprobe_skip_sstep() 56 opcode = __mem_to_opcode_arm(*(unsigned int *) auprobe->insn); in arch_uprobe_skip_sstep() 58 auprobe->asi.insn_singlestep(opcode, &auprobe->asi, regs); in arch_uprobe_skip_sstep() 75 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument [all …]
|
D | actions-arm.c | 69 static void uprobe_set_pc(struct arch_uprobe *auprobe, in uprobe_set_pc() argument 73 u32 pcreg = auprobe->pcreg; in uprobe_set_pc() 79 static void uprobe_unset_pc(struct arch_uprobe *auprobe, in uprobe_unset_pc() argument 84 regs->uregs[auprobe->pcreg] = autask->backup; in uprobe_unset_pc() 87 static void uprobe_aluwrite_pc(struct arch_uprobe *auprobe, in uprobe_aluwrite_pc() argument 91 u32 pcreg = auprobe->pcreg; in uprobe_aluwrite_pc() 97 static void uprobe_write_pc(struct arch_uprobe *auprobe, in uprobe_write_pc() argument 101 u32 pcreg = auprobe->pcreg; in uprobe_write_pc() 111 struct arch_uprobe *auprobe = container_of(asi, struct arch_uprobe, in decode_pc_ro() local 117 reg = uprobes_substitute_pc(&auprobe->ixol[0], regs); in decode_pc_ro() [all …]
|
/Linux-v4.19/arch/arm64/kernel/probes/ |
D | uprobes.c | 37 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument 48 insn = *(probe_opcode_t *)(&auprobe->insn[0]); in arch_uprobe_analyze_insn() 50 switch (arm_probe_decode_insn(insn, &auprobe->api)) { in arch_uprobe_analyze_insn() 55 auprobe->simulate = true; in arch_uprobe_analyze_insn() 65 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 80 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 106 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 111 if (!auprobe->simulate) in arch_uprobe_skip_sstep() 114 insn = *(probe_opcode_t *)(&auprobe->insn[0]); in arch_uprobe_skip_sstep() 117 if (auprobe->api.handler) in arch_uprobe_skip_sstep() [all …]
|
/Linux-v4.19/arch/s390/kernel/ |
D | uprobes.c | 23 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument 26 return probe_is_prohibited_opcode(auprobe->insn); in arch_uprobe_analyze_insn() 29 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 36 auprobe->saved_per = psw_bits(regs->psw).per; in arch_uprobe_pre_xol() 37 auprobe->saved_int_code = regs->int_code; in arch_uprobe_pre_xol() 78 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 80 int fixup = probe_get_fixup_type(auprobe->insn); in arch_uprobe_post_xol() 85 psw_bits(regs->psw).per = auprobe->saved_per; in arch_uprobe_post_xol() 86 regs->int_code = auprobe->saved_int_code; in arch_uprobe_post_xol() 91 int reg = (auprobe->insn[0] & 0xf0) >> 4; in arch_uprobe_post_xol() [all …]
|
/Linux-v4.19/arch/powerpc/kernel/ |
D | uprobes.c | 50 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, in arch_uprobe_analyze_insn() argument 64 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 112 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 167 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_abort_xol() argument 181 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 189 ret = emulate_step(regs, auprobe->insn); in arch_uprobe_skip_sstep()
|
/Linux-v4.19/arch/sparc/kernel/ |
D | uprobes.c | 89 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, in arch_uprobe_analyze_insn() argument 182 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 187 if (auprobe->ixol == (1 << 24)) { in arch_uprobe_skip_sstep() 203 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 229 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 233 u32 insn = auprobe->ixol; in arch_uprobe_post_xol() 306 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_abort_xol() argument
|
/Linux-v4.19/arch/arm/include/asm/ |
D | uprobes.h | 36 void (*prehandler)(struct arch_uprobe *auprobe, 39 void (*posthandler)(struct arch_uprobe *auprobe,
|
/Linux-v4.19/arch/mips/kernel/ |
D | uprobes.c | 224 int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, in set_swbp() argument 227 return uprobe_write_opcode(auprobe, mm, vaddr, UPROBE_SWBP_INSN); in set_swbp() 262 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument
|
/Linux-v4.19/include/linux/ |
D | uprobes.h | 124 extern int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vad…
|
/Linux-v4.19/kernel/events/ |
D | uprobes.c | 302 int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, in uprobe_write_opcode() argument 352 int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr) in set_swbp() argument 354 return uprobe_write_opcode(auprobe, mm, vaddr, UPROBE_SWBP_INSN); in set_swbp() 367 set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr) in set_orig_insn() argument 369 return uprobe_write_opcode(auprobe, mm, vaddr, in set_orig_insn() 370 *(uprobe_opcode_t *)&auprobe->insn); in set_orig_insn()
|