aboutsummaryrefslogtreecommitdiffstats
path: root/samples/kprobes/jprobe_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/kprobes/jprobe_example.c')
-rw-r--r--samples/kprobes/jprobe_example.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/samples/kprobes/jprobe_example.c b/samples/kprobes/jprobe_example.c
index 9119ac6a8270..c285a3b8a9f1 100644
--- a/samples/kprobes/jprobe_example.c
+++ b/samples/kprobes/jprobe_example.c
@@ -1,13 +1,13 @@
1/* 1/*
2 * Here's a sample kernel module showing the use of jprobes to dump 2 * Here's a sample kernel module showing the use of jprobes to dump
3 * the arguments of do_fork(). 3 * the arguments of _do_fork().
4 * 4 *
5 * For more information on theory of operation of jprobes, see 5 * For more information on theory of operation of jprobes, see
6 * Documentation/kprobes.txt 6 * Documentation/kprobes.txt
7 * 7 *
8 * Build and insert the kernel module as done in the kprobe example. 8 * Build and insert the kernel module as done in the kprobe example.
9 * You will see the trace data in /var/log/messages and on the 9 * You will see the trace data in /var/log/messages and on the
10 * console whenever do_fork() is invoked to create a new process. 10 * console whenever _do_fork() is invoked to create a new process.
11 * (Some messages may be suppressed if syslogd is configured to 11 * (Some messages may be suppressed if syslogd is configured to
12 * eliminate duplicate messages.) 12 * eliminate duplicate messages.)
13 */ 13 */
@@ -17,13 +17,13 @@
17#include <linux/kprobes.h> 17#include <linux/kprobes.h>
18 18
19/* 19/*
20 * Jumper probe for do_fork. 20 * Jumper probe for _do_fork.
21 * Mirror principle enables access to arguments of the probed routine 21 * Mirror principle enables access to arguments of the probed routine
22 * from the probe handler. 22 * from the probe handler.
23 */ 23 */
24 24
25/* Proxy routine having the same arguments as actual do_fork() routine */ 25/* Proxy routine having the same arguments as actual _do_fork() routine */
26static long jdo_fork(unsigned long clone_flags, unsigned long stack_start, 26static long j_do_fork(unsigned long clone_flags, unsigned long stack_start,
27 unsigned long stack_size, int __user *parent_tidptr, 27 unsigned long stack_size, int __user *parent_tidptr,
28 int __user *child_tidptr) 28 int __user *child_tidptr)
29{ 29{
@@ -36,9 +36,9 @@ static long jdo_fork(unsigned long clone_flags, unsigned long stack_start,
36} 36}
37 37
38static struct jprobe my_jprobe = { 38static struct jprobe my_jprobe = {
39 .entry = jdo_fork, 39 .entry = j_do_fork,
40 .kp = { 40 .kp = {
41 .symbol_name = "do_fork", 41 .symbol_name = "_do_fork",
42 }, 42 },
43}; 43};
44 44