linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: wangnan0@huawei.com (Wang Nan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 1/2] kprobes: copy ainsn after alloc aggr kprobe
Date: Wed, 19 Nov 2014 09:53:59 +0800	[thread overview]
Message-ID: <546BF837.1070104@huawei.com> (raw)
In-Reply-To: <546B2FAE.7000104@hitachi.com>

On 2014/11/18 19:38, Masami Hiramatsu wrote:
> Hi Wang,
> 
> (2014/11/18 15:32), Wang Nan wrote:
>> Copy old kprobe to newly alloced optimized_kprobe before
>> arch_prepare_optimized_kprobe(). Original kprove can brings more
>> information to optimizer.
> 
> As I've asked you on the previous series, I prefer to transfer the
> original kprobes to arch_prepare_optimized_kprobe().
> 
> OK, now I'll send you my patch. If you can agree, feel free to
> pick that into your series.
> 

Sorry. The new version series has heavy code changes in checker. I think
I must miss real optprobes code during my coding. I will collect your
patch and adjust my code in the next version.

Thank you.

> Thank you,
> 
>>
>> 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;
>>
> 
> 

  reply	other threads:[~2014-11-19  1:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  6:32 [PATCH v8 0/2] ARM: kprobes: enable OPTPROBES for ARM32 Wang Nan
2014-11-18  6:32 ` [PATCH v8 1/2] kprobes: copy ainsn after alloc aggr kprobe Wang Nan
2014-11-18 11:38   ` Masami Hiramatsu
2014-11-19  1:53     ` Wang Nan [this message]
2014-11-18  6:32 ` [PATCH v8 2/2] ARM: kprobes: enable OPTPROBES for ARM 32 Wang Nan
2014-11-19  7:08   ` Wang Nan
2014-11-18 19:34 ` [PATCH] kprobes: Pass the original kprobe for preparing optimized kprobe Masami Hiramatsu

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=546BF837.1070104@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).