<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/kernel/kprobes.c, branch v2.6.25</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v2.6.25</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v2.6.25'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2008-03-05T00:35:19+00:00</updated>
<entry>
<title>kprobes: fix a null pointer bug in register_kretprobe()</title>
<updated>2008-03-05T00:35:19+00:00</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@redhat.com</email>
</author>
<published>2008-03-04T22:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=b2a5cd6938879b5bcfef0a73c28fea84c49519c2'/>
<id>urn:sha1:b2a5cd6938879b5bcfef0a73c28fea84c49519c2</id>
<content type='text'>
Fix a bug in regiseter_kretprobe() which does not check rp-&gt;kp.symbol_name ==
NULL before calling kprobe_lookup_name.

For maintainability, this introduces kprobe_addr helper function which
resolves addr field.  It is used by register_kprobe and register_kretprobe.

Signed-off-by: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Jim Keniston &lt;jkenisto@us.ibm.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: indicate kretprobe support in Kconfig</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:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=9edddaa200df18e08fe0cf21036e8ae467b1363c'/>
<id>urn:sha1:9edddaa200df18e08fe0cf21036e8ae467b1363c</id>
<content type='text'>
Add CONFIG_HAVE_KRETPROBES to the arch/&lt;arch&gt;/Kconfig file for relevant
architectures with kprobes support.  This facilitates easy handling of
in-kernel modules (like samples/kprobes/kretprobe_example.c) that depend on
kretprobes being present in the kernel.

Thanks to Sam Ravnborg for helping make the patch more lean.

Per Mathieu's suggestion, added CONFIG_KRETPROBES and fixed up dependencies.

Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&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: kretprobe user entry-handler</title>
<updated>2008-02-06T18:41:11+00:00</updated>
<author>
<name>Abhishek Sagar</name>
<email>sagar.abhishek@gmail.com</email>
</author>
<published>2008-02-06T09:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f47cd9b553aaada602449204513b5a5b29cba263'/>
<id>urn:sha1:f47cd9b553aaada602449204513b5a5b29cba263</id>
<content type='text'>
Provide support to add an optional user defined callback to be run at
function entry of a kretprobe'd function.  Also modify the kprobe smoke
tests to include an entry-handler during the kretprobe sanity test.

Signed-off-by: Abhishek Sagar &lt;sagar.abhishek@gmail.com&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Acked-by: Jim Keniston &lt;jkenisto@us.ibm.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>x86: kprobes: add kprobes smoke tests that run on boot</title>
<updated>2008-01-30T12:32:53+00:00</updated>
<author>
<name>Ananth N Mavinakayanahalli</name>
<email>ananth@in.ibm.com</email>
</author>
<published>2008-01-30T12:32:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=8c1c9356429741a82ff176d0f3400fb9e06b2a30'/>
<id>urn:sha1:8c1c9356429741a82ff176d0f3400fb9e06b2a30</id>
<content type='text'>
Here is a quick and naive smoke test for kprobes. This is intended to
just verify if some unrelated change broke the *probes subsystem. It is
self contained, architecture agnostic and isn't of any great use by itself.

This needs to be built in the kernel and runs a basic set of tests to
verify if kprobes, jprobes and kretprobes run fine on the kernel. In case
of an error, it'll print out a message with a "BUG" prefix.

This is a start; we intend to add more tests to this bucket over time.

Thanks to Jim Keniston and Masami Hiramatsu for comments and suggestions.

Tested on x86 (32/64) and powerpc.

Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>kprobes: support kretprobe blacklist</title>
<updated>2007-10-16T16:43:10+00:00</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@redhat.com</email>
</author>
<published>2007-10-16T08:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f438d914b220051d4cbc65cbc5d98e163c85c93b'/>
<id>urn:sha1:f438d914b220051d4cbc65cbc5d98e163c85c93b</id>
<content type='text'>
Introduce architecture dependent kretprobe blacklists to prohibit users
from inserting return probes on the function in which kprobes can be
inserted but kretprobes can not.

This patch also removes "__kprobes" mark from "__switch_to" on x86_64 and
registers "__switch_to" to the blacklist on x86-64, because that mark is to
prohibit user from inserting only kretprobe.

Signed-off-by: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Acked-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@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>x86: optimize page faults like all other achitectures and kill notifier cruft</title>
<updated>2007-10-16T16:42:50+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2007-10-16T08:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=74a0b5762713a26496db72eac34fbbed46f20fce'/>
<id>urn:sha1:74a0b5762713a26496db72eac34fbbed46f20fce</id>
<content type='text'>
x86(-64) are the last architectures still using the page fault notifier
cruft for the kprobes page fault hook.  This patch converts them to the
proper direct calls, and removes the now unused pagefault notifier bits
aswell as the cruft in kprobes.c that was related to this mess.

I know Andi didn't really like this, but all other architecture maintainers
agreed the direct calls are much better and besides the obvious cruft
removal a common way of dealing with kprobes across architectures is
important aswell.

[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix sparc64]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@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>fix compilation with gcc 4.2</title>
<updated>2007-08-11T22:47:42+00:00</updated>
<author>
<name>Peter Chubb</name>
<email>peterc@gelato.unsw.edu.au</email>
</author>
<published>2007-08-10T20:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=cd5bfea278987ebfe60f3ff92a01696b17c4f978'/>
<id>urn:sha1:cd5bfea278987ebfe60f3ff92a01696b17c4f978</id>
<content type='text'>
gcc-4.2 is a lot more picky about its symbol handling.  EXPORT_SYMBOL no
longer works on symbols that are undefined or defined with static scope.

For example, with CONFIG_PROFILE off, I see:

  kernel/profile.c:206: error: __ksymtab_profile_event_unregister causes a section type conflict
  kernel/profile.c:205: error: __ksymtab_profile_event_register causes a section type conflict

This patch moves the EXPORTs inside the #ifdef CONFIG_PROFILE, so we
only try to export symbols that are defined.

Also, in kernel/kprobes.c there's an EXPORT_SYMBOL_GPL() for
jprobes_return, which if CONFIG_JPROBES is undefined is a static
inline and gives the same error.

And in drivers/acpi/resources/rsxface.c, there's an
ACPI_EXPORT_SYMBOPL() for a static symbol. If it's static, it's not
accessible from outside the compilation unit, so should bot be exported.

These three changes allow building a zx1_defconfig kernel with gcc 4.2
on IA64.

[akpm@linux-foundation.org: export jpobe_return properly]
Signed-off-by: Peter Chubb &lt;peterc@gelato.unsw.edu.au&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Len Brown &lt;lenb@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>jprobes: make jprobes a little safer for users</title>
<updated>2007-07-19T17:04:44+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>michael@ellerman.id.au</email>
</author>
<published>2007-07-19T08:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=3d7e33825d8799115dd2495c9944badd3272a623'/>
<id>urn:sha1:3d7e33825d8799115dd2495c9944badd3272a623</id>
<content type='text'>
I realise jprobes are a razor-blades-included type of interface, but that
doesn't mean we can't try and make them safer to use.  This guy I know once
wrote code like this:

struct jprobe jp = { .kp.symbol_name = "foo", .entry = "jprobe_foo" };

And then his kernel exploded. Oops.

This patch adds an arch hook, arch_deref_entry_point() (I don't like it
either) which takes the void * in a struct jprobe, and gives back the text
address that it represents.

We can then use that in register_jprobe() to check that the entry point we're
passed is actually in the kernel text, rather than just some random value.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Acked-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&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: The ON/OFF knob thru debugfs</title>
<updated>2007-05-08T18:15:19+00:00</updated>
<author>
<name>Ananth N Mavinakayanahalli</name>
<email>ananth@in.ibm.com</email>
</author>
<published>2007-05-08T07:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=bf8f6e5b3e51ee0c64c2d1350c70198ddc8ad3f7'/>
<id>urn:sha1:bf8f6e5b3e51ee0c64c2d1350c70198ddc8ad3f7</id>
<content type='text'>
This patch provides a debugfs knob to turn kprobes on/off

o A new file /debug/kprobes/enabled indicates if kprobes is enabled or
  not (default enabled)
o Echoing 0 to this file will disarm all installed probes
o Any new probe registration when disabled will register the probe but
  not arm it. A message will be printed out in such a case.
o When a value 1 is echoed to the file, all probes (including ones
  registered in the intervening period) will be enabled
o Unregistration will happen irrespective of whether probes are globally
  enabled or not.
o Update Documentation/kprobes.txt to reflect these changes. While there
  also update the doc to make it current.

We are also looking at providing sysrq key support to tie to the disabling
feature provided by this patch.

[akpm@linux-foundation.org: Use bool like a bool!]
[akpm@linux-foundation.org: add printk facility levels]
[cornelia.huck@de.ibm.com: Add the missing arch_trampoline_kprobe() for s390]
Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Signed-off-by: Srinivasa DS &lt;srinivasa@in.ibm.com&gt;
Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.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: kretprobes simplifications</title>
<updated>2007-05-08T18:15:19+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2007-05-08T07:34:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=4c4308cb93450989846ac49faeb6dab943e7657e'/>
<id>urn:sha1:4c4308cb93450989846ac49faeb6dab943e7657e</id>
<content type='text'>
 - consolidate duplicate code in all arch_prepare_kretprobe instances
   into common code
 - replace various odd helpers that use hlist_for_each_entry to get
   the first elemenet of a list with either a hlist_for_each_entry_save
   or an opencoded access to the first element in the caller
 - inline add_rp_inst into it's only remaining caller
 - use kretprobe_inst_table_head instead of opencoding it

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Acked-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@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>
</feed>
