lkml.org 
[lkml]   [2008]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] kprobes: kretprobe user entry-handler (updated)
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.



\
 
 \ /
  Last update: 2008-01-28 06:35    [W:0.069 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site