From: Dmitry Kovalenko Date: Fri, 22 Mar 2013 06:56:57 +0000 (+0400) Subject: [FEATURE] Put event at trace when insn can't be instrumented X-Git-Tag: Tizen_SDK_2.3~568^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18f4d9561d97f9f9747c9bd82a914242e4e71fa6;p=kernel%2Fswap-modules.git [FEATURE] Put event at trace when insn can't be instrumented --- diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index 6ca87b9..c0f7d46 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -1232,6 +1232,11 @@ int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic) ip->jprobe.priv_arg = ip; ret = dbi_register_ujprobe(task, &ip->jprobe, atomic); if (ret) { + if (ret == -ENOEXEC) { + pack_event_info(ERR_MSG_ID, RECORD_ENTRY, "dp", + 0x1, + ip->jprobe.kp.addr); + } DPRINTF ("dbi_register_ujprobe() failure %d", ret); return ret; } diff --git a/kprobe/arch/asm-arm/dbi_kprobes.c b/kprobe/arch/asm-arm/dbi_kprobes.c index eace6cd..db765c4 100644 --- a/kprobe/arch/asm-arm/dbi_kprobes.c +++ b/kprobe/arch/asm-arm/dbi_kprobes.c @@ -672,7 +672,7 @@ int arch_prepare_uprobe (struct kprobe *p, struct task_struct *task, int atomic) panic ("Failed to write memory %p!\n", p->addr); free_insn_slot(&uprobe_insn_pages, task, p->ainsn.insn_arm); free_insn_slot(&uprobe_insn_pages, task, p->ainsn.insn_thumb); - return -EFAULT; + return -ENOEXEC; } return ret; }