Home
last modified time | relevance | path

Searched refs:auprobe (Results 1 – 11 of 11) sorted by relevance

/arch/x86/kernel/
Duprobes.c277 static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool x86_64) in uprobe_init_insn() argument
283 ret = insn_decode(insn, auprobe->insn, sizeof(auprobe->insn), m); in uprobe_init_insn()
335 static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) in riprel_analyze() argument
350 cursor = auprobe->insn + insn_offset_rex_prefix(insn); in riprel_analyze()
369 cursor = auprobe->insn + insn_offset_vex_prefix(insn) + 1; in riprel_analyze()
433 auprobe->defparam.fixups |= UPROBE_FIX_RIP_SI; in riprel_analyze()
436 auprobe->defparam.fixups |= UPROBE_FIX_RIP_DI; in riprel_analyze()
440 auprobe->defparam.fixups |= UPROBE_FIX_RIP_BX; in riprel_analyze()
447 cursor = auprobe->insn + insn_offset_modrm(insn); in riprel_analyze()
457 scratch_reg(struct arch_uprobe *auprobe, struct pt_regs *regs) in scratch_reg() argument
[all …]
/arch/arm/probes/uprobes/
Dcore.c29 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 …]
Dactions-arm.c66 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 …]
/arch/csky/kernel/probes/
Duprobes.c24 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
68 instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size); in arch_uprobe_post_xol()
83 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument
88 if (!auprobe->simulate) in arch_uprobe_skip_sstep()
[all …]
/arch/riscv/kernel/probes/
Duprobes.c25 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument
30 opcode = *(probe_opcode_t *)(&auprobe->insn[0]); in arch_uprobe_analyze_insn()
32 auprobe->insn_size = GET_INSN_LENGTH(opcode); in arch_uprobe_analyze_insn()
34 switch (riscv_probe_decode_insn(&opcode, &auprobe->api)) { in arch_uprobe_analyze_insn()
39 auprobe->simulate = true; in arch_uprobe_analyze_insn()
43 auprobe->simulate = false; in arch_uprobe_analyze_insn()
53 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument
65 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument
72 instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size); in arch_uprobe_post_xol()
85 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument
[all …]
/arch/arm64/kernel/probes/
Duprobes.c34 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, in arch_uprobe_analyze_insn() argument
45 insn = *(probe_opcode_t *)(&auprobe->insn[0]); 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 = *(probe_opcode_t *)(&auprobe->insn[0]); in arch_uprobe_skip_sstep()
114 if (auprobe->api.handler) in arch_uprobe_skip_sstep()
[all …]
/arch/powerpc/kernel/
Duprobes.c38 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()
59 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument
107 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument
122 regs_set_return_ip(regs, (unsigned long)ppc_inst_next((void *)utask->vaddr, auprobe->insn)); in arch_uprobe_post_xol()
163 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_abort_xol() argument
177 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument
185 ret = emulate_step(regs, ppc_inst_read(auprobe->insn)); in arch_uprobe_skip_sstep()
/arch/s390/kernel/
Duprobes.c23 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 …]
/arch/sparc/kernel/
Duprobes.c76 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, in arch_uprobe_analyze_insn() argument
169 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument
174 if (auprobe->ixol == (1 << 24)) { in arch_uprobe_skip_sstep()
190 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_pre_xol() argument
216 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_post_xol() argument
220 u32 insn = auprobe->ixol; in arch_uprobe_post_xol()
293 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_abort_xol() argument
/arch/arm/include/asm/
Duprobes.h33 void (*prehandler)(struct arch_uprobe *auprobe,
36 void (*posthandler)(struct arch_uprobe *auprobe,
/arch/mips/kernel/
Duprobes.c221 int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, in set_swbp() argument
224 return uprobe_write_opcode(auprobe, mm, vaddr, UPROBE_SWBP_INSN); in set_swbp()
259 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) in arch_uprobe_skip_sstep() argument