<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/samples/kprobes, branch v4.8.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.8.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.8.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-08-04T12:50:07Z</updated>
<entry>
<title>samples/kretprobe: fix the wrong type</title>
<updated>2016-08-04T12:50:07Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-08-03T20:46:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57c24b2140437644f33eecdcc9c546bead0b5fbd'/>
<id>urn:sha1:57c24b2140437644f33eecdcc9c546bead0b5fbd</id>
<content type='text'>
The regs_return_value() returns "unsigned long" or "long" value.  But the
retval is int type now, it may cause overflow, the log may becomes:

    [ 2911.078869] do_brk returned -2003877888 and took 4620 ns to execute

This patch converts the retval to "unsigned long" type, and fixes the
overflow issue.

Link: http://lkml.kernel.org/r/1464143083-3877-4-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>
</entry>
<entry>
<title>samples/kretprobe: convert the printk to pr_info/pr_err</title>
<updated>2016-08-04T12:50:07Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-08-03T20:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=613413143faa3432e436674f1c2e57ad7d290ae1'/>
<id>urn:sha1:613413143faa3432e436674f1c2e57ad7d290ae1</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-3-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>
</entry>
<entry>
<title>samples/jprobe: convert the printk to pr_info/pr_err</title>
<updated>2016-08-04T12:50:07Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-08-03T20:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=468b88956c3317de6cf2317374faf671f950724b'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>samples/kprobe: convert the printk to pr_info/pr_err</title>
<updated>2016-08-04T12:50:07Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-08-03T20:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e708c1488bca54b901c4c3e73462ab2decdb8209'/>
<id>urn:sha1:e708c1488bca54b901c4c3e73462ab2decdb8209</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-1-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>
</entry>
<entry>
<title>kprobes: Add arm64 case in kprobe example module</title>
<updated>2016-07-19T14:03:23Z</updated>
<author>
<name>Sandeepa Prabhu</name>
<email>sandeepa.s.prabhu@gmail.com</email>
</author>
<published>2016-07-08T16:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af78cede8bfc772baf424fc03f7cd3c8f9437733'/>
<id>urn:sha1:af78cede8bfc772baf424fc03f7cd3c8f9437733</id>
<content type='text'>
Add info prints in sample kprobe handlers for ARM64

Signed-off-by: Sandeepa Prabhu &lt;sandeepa.s.prabhu@gmail.com&gt;
Signed-off-by: David A. Long &lt;dave.long@linaro.org&gt;
Acked-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>samples/kprobes: print out the symbol name for the hooks</title>
<updated>2016-05-21T00:58:30Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-05-21T00:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea9b50133ffebbd580cb5cd0aa222784d7a2fcb1'/>
<id>urn:sha1:ea9b50133ffebbd580cb5cd0aa222784d7a2fcb1</id>
<content type='text'>
Print out the symbol name for the hooks, it makes the logs more
readable.

Link: http://lkml.kernel.org/r/1463535417-29637-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;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>samples/kprobes: add a new module parameter</title>
<updated>2016-05-21T00:58:30Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-05-21T00:04:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d04659ac94528e9224dbf1aed37dd11dd952cacc'/>
<id>urn:sha1:d04659ac94528e9224dbf1aed37dd11dd952cacc</id>
<content type='text'>
Add a new module parameter which can be used as the symbol name.

Without this patch, we can only test the "_do_fork" function with this
kernel module.  With this patch, the module becomes more flexible; we
can test any functions with this module with

	# insmod kprobe_example.ko symbol="xxx"

Link: http://lkml.kernel.org/r/1463535417-29637-1-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;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kprobes: add the "tls" argument for j_do_fork</title>
<updated>2016-05-21T00:58:30Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie.huang@arm.com</email>
</author>
<published>2016-05-21T00:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=603ac5df86df5bfd26ed4d9c310dd196b07590ae'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>kprobes: use _do_fork() in samples to make them work again</title>
<updated>2015-10-02T01:42:35Z</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.com</email>
</author>
<published>2015-10-01T22:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=54aea4542980a3ed580426a81c5af799df4d610d'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>kprobes: update jprobe_example.c for do_fork() change</title>
<updated>2014-09-26T09:11:12Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2014-09-24T06:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e8ac6ea8a42d6506345056c6de3e81c97d3f20af'/>
<id>urn:sha1: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>
</entry>
</feed>
