All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Abhishek Sagar <sagar.abhishek@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	jkenisto@us.ibm.com, ananth@in.ibm.com
Subject: Re: [PATCH -mm] kprobes: kretprobe user entry-handler (updated)
Date: Mon, 28 Jan 2008 10:57:03 +0000	[thread overview]
Message-ID: <20080128105702.GE12910@shadowen.org> (raw)
In-Reply-To: <20080127213257.0889c523.akpm@linux-foundation.org>

On Sun, Jan 27, 2008 at 09:32:57PM -0800, Andrew Morton wrote:
> On Sat, 26 Jan 2008 23:52:48 +0530 Abhishek Sagar <sagar.abhishek@gmail.com> wrote:
> 
> > This is a repost of a patch which was reviewed earlier at:
> > http://lkml.org/lkml/2007/11/13/58 (thanks to Jim Keniston and Srinivasa for their review comments). This provides support to add an optional user defined callback to be run at function entry of a kretprobe'd function. It also modifies the kprobe smoke tests to include an entry-handler during the kretprobe sanity test.
> > 
> 
> Neither the changelog nor the newly-added documentation explain why Linux
> needs this feature.  What will it be used for??
> 
> 
> > +1.3.2 Kretprobe entry-handler
> > +
> > +Kretprobes also provides an optional user-specified handler which runs
> 
> I think "caller-specified" would be a better term here.  Generally "user"
> refers to Aunt Tillie sitting at the keyboard.
> 
> > +/* Timestamp function entry. */
> > +static int entry_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
> > +{
> > +	struct my_data *data;
> > +
> > +	if(!current->mm)
> > +		return 1; /* skip kernel threads */
> 
> gargh, what's happened to checkpatch lately?  It failed to notice the
> missing space.

This had me going for a while.  This was missed as this code is not
actually in a source file.  Its actually found in Documentation/kprobes.txt
and we do not apply source level checks to non-source file types.

Hmmm.

-apw

  parent reply	other threads:[~2008-01-28 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 18:22 [PATCH -mm] kprobes: kretprobe user entry-handler (updated) Abhishek Sagar
2008-01-28  5:32 ` Andrew Morton
2008-01-28 10:04   ` Abhishek Sagar
2008-01-28 10:57   ` Andy Whitcroft [this message]
2008-01-29 19:08 ` Jim Keniston

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=20080128105702.GE12910@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sagar.abhishek@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.