@@ -119,15 +119,22 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
{
kprobe_opcode_t insn;
unsigned long addr;
+ struct arch_specific_insn *ainsn;
if (!auprobe->simulate)
return false;
insn = *(kprobe_opcode_t *)(&auprobe->insn[0]);
addr = instruction_pointer(regs);
+ ainsn = &auprobe->ainsn;
+
+ if (ainsn->handler) {
+ if (!ainsn->check_condn || ainsn->check_condn(insn, ainsn, regs))
+ ainsn->handler(insn, addr, regs);
+ else
+ instruction_pointer_set(regs, instruction_pointer(regs) + 4);
+ }
- if (auprobe->ainsn.handler)
- auprobe->ainsn.handler(insn, addr, regs);
return true;
}