From: Ingo Molnar <mingo@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] jprobes: Ensure that the probepoint is at function entry
Date: Thu, 6 Jul 2017 14:15:49 +0200 [thread overview]
Message-ID: <20170706121549.iqwcqh6xg4cyli5p@gmail.com> (raw)
In-Reply-To: <20170706190323.8892576e53af1be29f6cf8f4@kernel.org>
* Masami Hiramatsu <mhiramat@kernel.org> wrote:
> > Also, 'function_offset_within_entry' is way too long a name, and it's also a
> > minomer I think. The purpose of this function is to enforce that the relative
> > 'offset' of a new probe is at the standard function entry offset: i.e. 0 on most
> > architectures, and some ABI dependent constant on PowerPC, right?
> >
> > That's not at all clear from that name, plus it's a global namespace symbol, yet
> > has no 'kprobes' prefix. So it should be named something like
> > 'kprobe_offset_valid()' or such, with an arch_kprobe_offset_valid() counterpart.
>
> Hmm, I would rather like kprobe_within_entry(), since offset != 0 is
> actually valid for normal kprobe, that is kretprobe and jprobe limitation.
But what entry? That it's within a range or that offset is always 0 is really an
implementational detail: depending on what type of kprobe it is, it is either
validly within the confines of the specified function symbol or not.
What _really_ matters to callers is whether it's a valid kprobe to be inserted
into that function, right?
I.e. the long name came from over-specifying what is done by the function - while
simplifying makes it actually more meaningful to read.
Thanks,
Ingo
next prev parent reply other threads:[~2017-07-06 12:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 14:56 [PATCH] jprobes: Ensure that the probepoint is at function entry Naveen N. Rao
2017-07-05 10:42 ` Ingo Molnar
2017-07-06 10:03 ` Masami Hiramatsu
2017-07-06 12:15 ` Ingo Molnar [this message]
2017-07-07 1:02 ` Masami Hiramatsu
2017-07-07 10:49 ` Ingo Molnar
2017-07-07 11:26 ` Naveen N. Rao
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=20170706121549.iqwcqh6xg4cyli5p@gmail.com \
--to=mingo@kernel.org \
--cc=ananth@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=naveen.n.rao@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).