/linux-6.12.1/arch/x86/kernel/ |
D | uprobes.c | 278 static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool x86_64) in uprobe_init_insn() argument 284 ret = insn_decode(insn, auprobe->insn, sizeof(auprobe->insn), m); in uprobe_init_insn() 452 static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) in riprel_analyze() argument 467 cursor = auprobe->insn + insn_offset_rex_prefix(insn); in riprel_analyze() 486 cursor = auprobe->insn + insn_offset_vex_prefix(insn) + 1; in riprel_analyze() 550 auprobe->defparam.fixups |= UPROBE_FIX_RIP_SI; in riprel_analyze() 553 auprobe->defparam.fixups |= UPROBE_FIX_RIP_DI; in riprel_analyze() 557 auprobe->defparam.fixups |= UPROBE_FIX_RIP_BX; in riprel_analyze() 564 cursor = auprobe->insn + insn_offset_modrm(insn); in riprel_analyze() 574 scratch_reg(struct arch_uprobe *auprobe, struct pt_regs *regs) in scratch_reg() argument [all …]
|
/linux-6.12.1/arch/arm/probes/uprobes/ |
D | core.c | 29 int set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, in set_swbp() argument 32 return uprobe_write_opcode(auprobe, mm, vaddr, in set_swbp() 33 __opcode_to_mem_arm(auprobe->bpinsn)); in set_swbp() 36 bool arch_uprobe_ignore(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_ignore() argument 38 if (!auprobe->asi.insn_check_cc(regs->ARM_cpsr)) { in arch_uprobe_ignore() 46 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 50 if (!auprobe->simulate) in arch_uprobe_skip_sstep() 53 opcode = __mem_to_opcode_arm(*(unsigned int *) auprobe->insn); in arch_uprobe_skip_sstep() 55 auprobe->asi.insn_singlestep(opcode, &auprobe->asi, regs); in arch_uprobe_skip_sstep() 72 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument [all …]
|
D | actions-arm.c | 66 static void uprobe_set_pc(struct arch_uprobe *auprobe, in uprobe_set_pc() argument 70 u32 pcreg = auprobe->pcreg; in uprobe_set_pc() 76 static void uprobe_unset_pc(struct arch_uprobe *auprobe, in uprobe_unset_pc() argument 81 regs->uregs[auprobe->pcreg] = autask->backup; in uprobe_unset_pc() 84 static void uprobe_aluwrite_pc(struct arch_uprobe *auprobe, in uprobe_aluwrite_pc() argument 88 u32 pcreg = auprobe->pcreg; in uprobe_aluwrite_pc() 94 static void uprobe_write_pc(struct arch_uprobe *auprobe, in uprobe_write_pc() argument 98 u32 pcreg = auprobe->pcreg; in uprobe_write_pc() 108 struct arch_uprobe *auprobe = container_of(asi, struct arch_uprobe, in decode_pc_ro() local 114 reg = uprobes_substitute_pc(&auprobe->ixol[0], regs); in decode_pc_ro() [all …]
|
/linux-6.12.1/arch/loongarch/kernel/ |
D | uprobes.c | 10 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, in arch_uprobe_analyze_insn() argument 19 for (idx = ARRAY_SIZE(auprobe->insn) - 1; idx >= 0; idx--) { in arch_uprobe_analyze_insn() 20 insn.word = auprobe->insn[idx]; in arch_uprobe_analyze_insn() 26 auprobe->ixol[0] = larch_insn_gen_nop(); in arch_uprobe_analyze_insn() 27 auprobe->simulate = true; in arch_uprobe_analyze_insn() 29 auprobe->ixol[0] = auprobe->insn[0]; in arch_uprobe_analyze_insn() 30 auprobe->simulate = false; in arch_uprobe_analyze_insn() 33 auprobe->ixol[1] = UPROBE_XOLBP_INSN; in arch_uprobe_analyze_insn() 38 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 50 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument [all …]
|
/linux-6.12.1/arch/csky/kernel/probes/ |
D | uprobes.c | 24 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument 29 insn = *(probe_opcode_t *)(&auprobe->insn[0]); in arch_uprobe_analyze_insn() 31 auprobe->insn_size = is_insn32(insn) ? 4 : 2; in arch_uprobe_analyze_insn() 33 switch (csky_probe_decode_insn(&insn, &auprobe->api)) { in arch_uprobe_analyze_insn() 38 auprobe->simulate = true; in arch_uprobe_analyze_insn() 48 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 62 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 69 instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size); in arch_uprobe_post_xol() 84 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 89 if (!auprobe->simulate) in arch_uprobe_skip_sstep() [all …]
|
/linux-6.12.1/arch/riscv/kernel/probes/ |
D | uprobes.c | 31 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument 36 opcode = *(probe_opcode_t *)(&auprobe->insn[0]); in arch_uprobe_analyze_insn() 38 auprobe->insn_size = GET_INSN_LENGTH(opcode); in arch_uprobe_analyze_insn() 40 switch (riscv_probe_decode_insn(&opcode, &auprobe->api)) { in arch_uprobe_analyze_insn() 45 auprobe->simulate = true; in arch_uprobe_analyze_insn() 49 auprobe->simulate = false; in arch_uprobe_analyze_insn() 59 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 71 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 78 instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size); in arch_uprobe_post_xol() 91 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument [all …]
|
/linux-6.12.1/arch/arm64/kernel/probes/ |
D | uprobes.c | 34 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument 45 insn = le32_to_cpu(auprobe->insn); in arch_uprobe_analyze_insn() 47 switch (arm_probe_decode_insn(insn, &auprobe->api)) { in arch_uprobe_analyze_insn() 52 auprobe->simulate = true; in arch_uprobe_analyze_insn() 62 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 77 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 103 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 108 if (!auprobe->simulate) in arch_uprobe_skip_sstep() 111 insn = le32_to_cpu(auprobe->insn); in arch_uprobe_skip_sstep() 114 if (auprobe->api.handler) in arch_uprobe_skip_sstep() [all …]
|
/linux-6.12.1/arch/powerpc/kernel/ |
D | uprobes.c | 38 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, in arch_uprobe_analyze_insn() argument 45 ppc_inst_prefixed(ppc_inst_read(auprobe->insn)) && in arch_uprobe_analyze_insn() 51 if (!can_single_step(ppc_inst_val(ppc_inst_read(auprobe->insn)))) { in arch_uprobe_analyze_insn() 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 127 regs_set_return_ip(regs, (unsigned long)ppc_inst_next((void *)utask->vaddr, auprobe->insn)); in arch_uprobe_post_xol() 168 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_abort_xol() argument 182 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 190 ret = emulate_step(regs, ppc_inst_read(auprobe->insn)); in arch_uprobe_skip_sstep()
|
/linux-6.12.1/arch/s390/kernel/ |
D | uprobes.c | 22 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument 25 return probe_is_prohibited_opcode(auprobe->insn); in arch_uprobe_analyze_insn() 28 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 35 auprobe->saved_per = psw_bits(regs->psw).per; in arch_uprobe_pre_xol() 36 auprobe->saved_int_code = regs->int_code; in arch_uprobe_pre_xol() 77 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 79 int fixup = probe_get_fixup_type(auprobe->insn); in arch_uprobe_post_xol() 84 psw_bits(regs->psw).per = auprobe->saved_per; in arch_uprobe_post_xol() 85 regs->int_code = auprobe->saved_int_code; in arch_uprobe_post_xol() 90 int reg = (auprobe->insn[0] & 0xf0) >> 4; in arch_uprobe_post_xol() [all …]
|
/linux-6.12.1/arch/sparc/kernel/ |
D | uprobes.c | 78 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, in arch_uprobe_analyze_insn() argument 171 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument 176 if (auprobe->ixol == (1 << 24)) { in arch_uprobe_skip_sstep() 192 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument 218 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument 222 u32 insn = auprobe->ixol; in arch_uprobe_post_xol() 295 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_abort_xol() argument
|
/linux-6.12.1/arch/arm/include/asm/ |
D | uprobes.h | 33 void (*prehandler)(struct arch_uprobe *auprobe, 36 void (*posthandler)(struct arch_uprobe *auprobe,
|
/linux-6.12.1/include/linux/ |
D | uprobes.h | 80 struct arch_uprobe *auprobe; member 115 extern int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vad…
|
/linux-6.12.1/kernel/events/ |
D | uprobes.c | 467 int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, in uprobe_write_opcode() argument 478 uprobe = container_of(auprobe, struct uprobe, arch); in uprobe_write_opcode() 577 int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr) in set_swbp() argument 579 return uprobe_write_opcode(auprobe, mm, vaddr, UPROBE_SWBP_INSN); in set_swbp() 592 set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr) in set_orig_insn() argument 594 return uprobe_write_opcode(auprobe, mm, vaddr, in set_orig_insn() 595 *(uprobe_opcode_t *)&auprobe->insn); in set_orig_insn() 2135 current->utask->auprobe = &uprobe->arch; in handler_chain() 2153 current->utask->auprobe = NULL; in handler_chain()
|
/linux-6.12.1/arch/mips/kernel/ |
D | uprobes.c | 243 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument
|
/linux-6.12.1/arch/x86/events/ |
D | core.c | 2834 struct arch_uprobe *auprobe; in is_uprobe_at_func_entry() local 2839 auprobe = current->utask->auprobe; in is_uprobe_at_func_entry() 2840 if (!auprobe) in is_uprobe_at_func_entry() 2844 if (auprobe->insn[0] == 0x55) in is_uprobe_at_func_entry() 2848 if (user_64bit_mode(regs) && is_endbr(*(u32 *)auprobe->insn)) in is_uprobe_at_func_entry()
|