From: Wang Nan <wangnan0@huawei.com>
To: <tixy@linaro.org>, <masami.hiramatsu.pt@hitachi.com>,
<linux@arm.linux.org.uk>, <will.deacon@arm.com>,
<dave.long@linaro.org>, <taras.kondratiuk@linaro.org>,
Ben Dooks <ben.dooks@codethink.co.uk>,
Christoph Lameter <cl@linux.com>, Rabin Vincent <rabin@rab.in>,
"David S. Miller" <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
"Li Zefan" <lizefan@huawei.com>
Subject: [PATCH v6 6/7] kprobes: copy ainsn after alloc aggr kprobe
Date: Wed, 22 Oct 2014 19:32:04 +0800 [thread overview]
Message-ID: <1413977525-51480-7-git-send-email-wangnan0@huawei.com> (raw)
In-Reply-To: <1413977525-51480-1-git-send-email-wangnan0@huawei.com>
Copy old kprobe to newly alloced optimized_kprobe before
arch_prepare_optimized_kprobe(). Original kprove can brings more
information to optimizer.
v1 -> v2:
- Bugfix: copy p->addr when alloc_aggr_kprobe.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
---
kernel/kprobes.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 3995f54..e9868ec 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -730,7 +730,13 @@ static struct kprobe *alloc_aggr_kprobe(struct kprobe *p)
return NULL;
INIT_LIST_HEAD(&op->list);
+
+ /*
+ * copy gives arch_prepare_optimized_kprobe
+ * more information
+ */
op->kp.addr = p->addr;
+ copy_kprobe(p, &op->kp);
arch_prepare_optimized_kprobe(op);
return &op->kp;
--
1.8.4
next prev parent reply other threads:[~2014-10-22 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 11:31 [PATCH v6 0/7] ARM: kprobes: enable OPTPROBES for ARM 32 Wang Nan
2014-10-22 11:31 ` [PATCH v6 1/7] ARM: kprobes: replace 'union decode_action' to 'struct decode_action' Wang Nan
2014-10-22 11:32 ` [PATCH v6 2/7] ARM: kprobes: seprates load and store actions Wang Nan
2014-10-22 11:32 ` [PATCH v6 3/7] ARM: kprobes: introduces checker Wang Nan
2014-10-22 11:32 ` [PATCH v6 4/7] ARM: kprobes: collects stack consumption for store instructions Wang Nan
2014-10-22 11:32 ` [PATCH v6 5/7] ARM: kprobes: disallow probing stack consuming instructions Wang Nan
2014-10-22 11:32 ` Wang Nan [this message]
2014-10-22 11:32 ` [PATCH v6 7/7] ARM: kprobes: enable OPTPROBES for ARM 32 Wang Nan
2014-10-24 0:52 ` [PATCH v6 0/7] " Masami Hiramatsu
2014-10-24 9:02 ` Jon Medhurst (Tixy)
2014-10-25 9:49 ` Wang Nan
2014-10-27 17:17 ` Jon Medhurst (Tixy)
2014-10-28 10:58 ` Jon Medhurst (Tixy)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413977525-51480-7-git-send-email-wangnan0@huawei.com \
--to=wangnan0@huawei.com \
--cc=ben.dooks@codethink.co.uk \
--cc=cl@linux.com \
--cc=dave.long@linaro.org \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=rabin@rab.in \
--cc=taras.kondratiuk@linaro.org \
--cc=tixy@linaro.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®