This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Bug translator/5916] New: Exploit kretprobe entry_handler + data pouch?
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: "jkenisto at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- Cc: systemtap at sources dot redhat dot com
- Date: Wed, 12 Mar 2008 09:57:51 +0530
- Subject: Re: [Bug translator/5916] New: Exploit kretprobe entry_handler + data pouch?
- References: <20080311210653.5916.jkenisto@us.ibm.com>
- Reply-to: ananth at in dot ibm dot com
On Tue, Mar 11, 2008 at 09:06:54PM -0000, jkenisto at us dot ibm dot com wrote:
> As of Linux 2.6.25-rc1, kretprobes contains the per-kretprobe_instance "data
> pouch" prototyped by Kevin Stafford years ago. When a kretprobed function is
> entered, and a kretprobe_instance is available, rp->entry_handler (if any) is
> called to pouch data that can be retrieved upon function return.
The samples/kprobes/kretprobe_example.c in Linus' current tree has a
facility for users to specify a function name to retprobe and in
addition to the return value, this module will also print out the time
taken to execute the function.
Try 'modprobe kretprobe_example func=<foo>'
The timing feature was added by Abhishek Sagar. It was just enhanced to
take a function name using a module_parm.