<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/samples/kprobes/jprobe_example.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>kprobes: Remove the jprobes sample code</title>
<updated>2017-10-20T09:02:55+00:00</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2017-10-05T23:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9be95bdc53c12ada23e39027237fd05e1393d893'/>
<id>9be95bdc53c12ada23e39027237fd05e1393d893</id>
<content type='text'>
Remove the jprobes sample module because jprobes are deprecated.

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@linux.vnet.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: David S . Miller &lt;davem@davemloft.net&gt;
Cc: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Paul E . McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Link: http://lkml.kernel.org/r/150724535709.5014.7261513316230565780.stgit@devbox
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the jprobes sample module because jprobes are deprecated.

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@linux.vnet.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: David S . Miller &lt;davem@davemloft.net&gt;
Cc: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Paul E . McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Link: http://lkml.kernel.org/r/150724535709.5014.7261513316230565780.stgit@devbox
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/jprobe: convert the printk to pr_info/pr_err</title>
<updated>2016-08-04T12:50:07+00:00</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-08-03T20:46:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=468b88956c3317de6cf2317374faf671f950724b'/>
<id>468b88956c3317de6cf2317374faf671f950724b</id>
<content type='text'>
We prefer to use the pr_* to print out the log now, this patch converts
the printk to pr_info.  In the error path, use the pr_err to replace the
printk.

Link: http://lkml.kernel.org/r/1464143083-3877-2-git-send-email-shijie.huang@arm.com
Signed-off-by: Huang Shijie &lt;shijie.huang@arm.com&gt;
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Steve Capper &lt;steve.capper@arm.com&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@linux.vnet.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We prefer to use the pr_* to print out the log now, this patch converts
the printk to pr_info.  In the error path, use the pr_err to replace the
printk.

Link: http://lkml.kernel.org/r/1464143083-3877-2-git-send-email-shijie.huang@arm.com
Signed-off-by: Huang Shijie &lt;shijie.huang@arm.com&gt;
Cc: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Steve Capper &lt;steve.capper@arm.com&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@linux.vnet.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kprobes: add the "tls" argument for j_do_fork</title>
<updated>2016-05-21T00:58:30+00:00</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-05-21T00:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=603ac5df86df5bfd26ed4d9c310dd196b07590ae'/>
<id>603ac5df86df5bfd26ed4d9c310dd196b07590ae</id>
<content type='text'>
Commit 3033f14ab78c ("clone: support passing tls argument via C rather
than pt_regs magic") added the tls argument for _do_fork().  This patch
adds the "tls" argument for j_do_fork to make it match _do_fork().

Signed-off-by: Huang Shijie &lt;shijie.huang@arm.com&gt;
Acked-by: Steve Capper &lt;steve.capper@arm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Thiago Macieira &lt;thiago.macieira@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 3033f14ab78c ("clone: support passing tls argument via C rather
than pt_regs magic") added the tls argument for _do_fork().  This patch
adds the "tls" argument for j_do_fork to make it match _do_fork().

Signed-off-by: Huang Shijie &lt;shijie.huang@arm.com&gt;
Acked-by: Steve Capper &lt;steve.capper@arm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Thiago Macieira &lt;thiago.macieira@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kprobes: use _do_fork() in samples to make them work again</title>
<updated>2015-10-02T01:42:35+00:00</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.com</email>
</author>
<published>2015-10-01T22:37:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=54aea4542980a3ed580426a81c5af799df4d610d'/>
<id>54aea4542980a3ed580426a81c5af799df4d610d</id>
<content type='text'>
Commit 3033f14ab78c ("clone: support passing tls argument via C rather
than pt_regs magic") introduced _do_fork() that allowed to pass @tls
parameter.

The old do_fork() is defined only for architectures that are not ready
to use this way and do not define HAVE_COPY_THREAD_TLS.

Let's use _do_fork() in the kprobe examples to make them work again on
all architectures.

Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Thiago Macieira &lt;thiago.macieira@intel.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 3033f14ab78c ("clone: support passing tls argument via C rather
than pt_regs magic") introduced _do_fork() that allowed to pass @tls
parameter.

The old do_fork() is defined only for architectures that are not ready
to use this way and do not define HAVE_COPY_THREAD_TLS.

Let's use _do_fork() in the kprobe examples to make them work again on
all architectures.

Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Thiago Macieira &lt;thiago.macieira@intel.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kprobes: update jprobe_example.c for do_fork() change</title>
<updated>2014-09-26T09:11:12+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2014-09-24T06:08:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e8ac6ea8a42d6506345056c6de3e81c97d3f20af'/>
<id>e8ac6ea8a42d6506345056c6de3e81c97d3f20af</id>
<content type='text'>
In commit e80d666 "flagday: kill pt_regs argument of do_fork()", the
arguments to do_fork() changed.

The example code in jprobe_example.c was not updated to match, so the
arguments inside the jprobe handler do not match reality.

Fix it by updating the arguments to match do_fork(). While we're at it
use pr_info() for brevity, and print stack_start as well for interest.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit e80d666 "flagday: kill pt_regs argument of do_fork()", the
arguments to do_fork() changed.

The example code in jprobe_example.c was not updated to match, so the
arguments inside the jprobe handler do not match reality.

Fix it by updating the arguments to match do_fork(). While we're at it
use pr_info() for brevity, and print stack_start as well for interest.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Kprobes: move kprobe examples to samples/</title>
<updated>2008-03-05T00:35:11+00:00</updated>
<author>
<name>Ananth N Mavinakayanahalli</name>
<email>ananth@in.ibm.com</email>
</author>
<published>2008-03-04T22:28:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=804defea1c020d5c52985685e56986f1a399acde'/>
<id>804defea1c020d5c52985685e56986f1a399acde</id>
<content type='text'>
Move kprobes examples from Documentation/kprobes.txt to under samples/.
Patch originally by Randy Dunlap.

o Updated the patch to apply on 2.6.25-rc3
o Modified examples code to build on multiple architectures. Currently,
  the kprobe and jprobe examples code works for x86 and powerpc
o Cleaned up unneeded #includes
o Cleaned up Kconfig per Sam Ravnborg's suggestions to fix build break
  on archs that don't have kretprobes
o Implemented suggestions by Mathieu Desnoyers on CONFIG_KRETPROBES
o Included Andrew Morton's cleanup based on x86-git
o Modified kretprobe_example to act as a arch-agnostic module to
  determine routine execution times:
	Use 'modprobe kretprobe_example func=&lt;func_name&gt;' to determine
	execution time of func_name in nanoseconds.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move kprobes examples from Documentation/kprobes.txt to under samples/.
Patch originally by Randy Dunlap.

o Updated the patch to apply on 2.6.25-rc3
o Modified examples code to build on multiple architectures. Currently,
  the kprobe and jprobe examples code works for x86 and powerpc
o Cleaned up unneeded #includes
o Cleaned up Kconfig per Sam Ravnborg's suggestions to fix build break
  on archs that don't have kretprobes
o Implemented suggestions by Mathieu Desnoyers on CONFIG_KRETPROBES
o Included Andrew Morton's cleanup based on x86-git
o Modified kretprobe_example to act as a arch-agnostic module to
  determine routine execution times:
	Use 'modprobe kretprobe_example func=&lt;func_name&gt;' to determine
	execution time of func_name in nanoseconds.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
