From: Masami Hiramatsu <mhiramat@kernel.org>
To: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
ananth@in.ibm.com, naveen.n.rao@linux.vnet.ibm.com,
paulus@samba.org, srikar@linux.vnet.ibm.com,
benh@kernel.crashing.org, mpe@ellerman.id.au,
hemant@linux.vnet.ibm.com, mahesh@linux.vnet.ibm.com
Subject: Re: [PATCH 2/3] arch/powerpc : optprobes for powerpc core
Date: Sat, 10 Sep 2016 00:34:18 +0900 [thread overview]
Message-ID: <20160910003418.f4ce0035ccec76c5ec14eb4e@kernel.org> (raw)
In-Reply-To: <fd56afb9-c78e-521c-ef60-3e75cb6e24c7@linux.vnet.ibm.com>
Hi Anju,
On Fri, 9 Sep 2016 16:19:41 +0530
Anju T Sudhakar <anju@linux.vnet.ibm.com> wrote:
> >> +void arch_unoptimize_kprobe(struct optimized_kprobe *op)
> >> +{
> >> + arch_arm_kprobe(&op->kp);
> >> +}
> >> +
> >> +void arch_unoptimize_kprobes(struct list_head *oplist,
> >> + struct list_head *done_list)
> >> +{
> >> + struct optimized_kprobe *op;
> >> + struct optimized_kprobe *tmp;
> >> +
> >> + list_for_each_entry_safe(op, tmp, oplist, list) {
> >> + arch_unoptimize_kprobe(op);
> >> + list_move(&op->list, done_list);
> >> + }
> >> +}
> >> +
> >> +int arch_within_optimized_kprobe(struct optimized_kprobe *op,
> >> + unsigned long addr)
> >> +{
> >> + return 0;
> > Here, please check the address range as same as arm32 optprobe implementation.
> >
> > e.g.
> > return ((unsigned long)op->kp.addr <= addr &&
> > (unsigned long)op->kp.addr + RELATIVEJUMP_SIZE > addr);
> >
> >
> > Thank you,
>
> Do we really need this? The only case this check will succeed is if
> kp.addr is not a multiple of 4, which is not a valid address at all
> onPower. So should we again check here for that?
Yes, since that is exported function, which means it can be used from
other part, other usage (e.g. for debug reason someone wants to use it).
Please do not optimize the code only for current implementation, but
for generic use case.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2016-09-09 15:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 9:33 [PATCH 0/3] OPTPROBES for powerpc Anju T Sudhakar
2016-09-07 9:33 ` [PATCH 1/3] arch/powerpc : Add detour buffer support for optprobes Anju T Sudhakar
2016-09-07 9:33 ` [PATCH 2/3] arch/powerpc : optprobes for powerpc core Anju T Sudhakar
2016-09-08 16:47 ` Masami Hiramatsu
2016-09-09 10:49 ` Anju T Sudhakar
2016-09-09 15:34 ` Masami Hiramatsu [this message]
2016-09-07 9:33 ` [PATCH 3/3] arch/powerpc : Enable optprobes support in powerpc Anju T Sudhakar
2016-09-08 16:11 ` [PATCH 0/3] OPTPROBES for powerpc 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=20160910003418.f4ce0035ccec76c5ec14eb4e@kernel.org \
--to=mhiramat@kernel.org \
--cc=ananth@in.ibm.com \
--cc=anju@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=hemant@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=srikar@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).