<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/kprobes.c, branch v2.6.18</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[PATCH] IA64: kprobe invalidate icache of jump buffer</title>
<updated>2006-07-31T20:28:38+00:00</updated>
<author>
<name>bibo, mao</name>
<email>bibo.mao@intel.com</email>
</author>
<published>2006-07-30T10:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a9ad965ea9a6d719daf333847a2ceb0e363994bd'/>
<id>a9ad965ea9a6d719daf333847a2ceb0e363994bd</id>
<content type='text'>
Kprobe inserts breakpoint instruction in probepoint and then jumps to
instruction slot when breakpoint is hit, the instruction slot icache must
be consistent with dcache.  Here is the patch which invalidates instruction
slot icache area.

Without this patch, in some machines there will be fault when executing
instruction slot where icache content is inconsistent with dcache.

Signed-off-by: bibo,mao &lt;bibo.mao@intel.com&gt;
Acked-by: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Acked-by: Keshavamurthy Anil S &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kprobe inserts breakpoint instruction in probepoint and then jumps to
instruction slot when breakpoint is hit, the instruction slot icache must
be consistent with dcache.  Here is the patch which invalidates instruction
slot icache area.

Without this patch, in some machines there will be fault when executing
instruction slot where icache content is inconsistent with dcache.

Signed-off-by: bibo,mao &lt;bibo.mao@intel.com&gt;
Acked-by: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Acked-by: Keshavamurthy Anil S &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Notify page fault call chain</title>
<updated>2006-06-26T16:58:22+00:00</updated>
<author>
<name>Anil S Keshavamurthy</name>
<email>anil.s.keshavamurthy@intel.com</email>
</author>
<published>2006-06-26T07:25:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6f47f978bcd5413fff610613b18e9e0eab9bc1b'/>
<id>e6f47f978bcd5413fff610613b18e9e0eab9bc1b</id>
<content type='text'>
With this patch Kprobes now registers for page fault notifications only when
their is an active probe registered.  Once all the active probes are
unregistered their is no need to be notified of page faults and kprobes
unregisters itself from the page fault notifications.  Hence we will have ZERO
side effects when no probes are active.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this patch Kprobes now registers for page fault notifications only when
their is an active probe registered.  Once all the active probes are
unregistered their is no need to be notified of page faults and kprobes
unregisters itself from the page fault notifications.  Hence we will have ZERO
side effects when no probes are active.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Kprobes registers for notify page fault</title>
<updated>2006-06-26T16:58:22+00:00</updated>
<author>
<name>Anil S Keshavamurthy</name>
<email>anil.s.keshavamurthy@intel.com</email>
</author>
<published>2006-06-26T07:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3d5631e0631a11633c649bc995a6537ec21b67b4'/>
<id>3d5631e0631a11633c649bc995a6537ec21b67b4</id>
<content type='text'>
Kprobes now registers for page fault notifications.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavmurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kprobes now registers for page fault notifications.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavmurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Kprobe: multi kprobe posthandler for booster</title>
<updated>2006-06-26T16:58:22+00:00</updated>
<author>
<name>mao, bibo</name>
<email>bibo.mao@intel.com</email>
</author>
<published>2006-06-26T07:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=36721656776f177280ccb50477a02e86e6444292'/>
<id>36721656776f177280ccb50477a02e86e6444292</id>
<content type='text'>
If there are multi kprobes on the same probepoint, there will be one extra
aggr_kprobe on the head of kprobe list.  The aggr_kprobe has
aggr_post_handler/aggr_break_handler whether the other kprobe
post_hander/break_handler is NULL or not.  This patch modifies this, only
when there is one or more kprobe in the list whose post_handler is not
NULL, post_handler of aggr_kprobe will be set as aggr_post_handler.

[soshima@redhat.com: !CONFIG_PREEMPT fix]
Signed-off-by: bibo, mao &lt;bibo.mao@intel.com&gt;
Cc: Masami Hiramatsu &lt;hiramatu@sdl.hitachi.co.jp&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: "Keshavamurthy, Anil S" &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Cc: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Cc: Yumiko Sugita &lt;sugita@sdl.hitachi.co.jp&gt;
Cc: Hideo Aoki &lt;haoki@redhat.com&gt;
Signed-off-by: Satoshi Oshima &lt;soshima@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there are multi kprobes on the same probepoint, there will be one extra
aggr_kprobe on the head of kprobe list.  The aggr_kprobe has
aggr_post_handler/aggr_break_handler whether the other kprobe
post_hander/break_handler is NULL or not.  This patch modifies this, only
when there is one or more kprobe in the list whose post_handler is not
NULL, post_handler of aggr_kprobe will be set as aggr_post_handler.

[soshima@redhat.com: !CONFIG_PREEMPT fix]
Signed-off-by: bibo, mao &lt;bibo.mao@intel.com&gt;
Cc: Masami Hiramatsu &lt;hiramatu@sdl.hitachi.co.jp&gt;
Cc: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Cc: "Keshavamurthy, Anil S" &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: Prasanna S Panchamukhi &lt;prasanna@in.ibm.com&gt;
Cc: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Cc: Yumiko Sugita &lt;sugita@sdl.hitachi.co.jp&gt;
Cc: Hideo Aoki &lt;haoki@redhat.com&gt;
Signed-off-by: Satoshi Oshima &lt;soshima@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kprobes: NULL out non-relevant fields in struct kretprobe</title>
<updated>2006-04-20T14:54:03+00:00</updated>
<author>
<name>Ananth N Mavinakayanahalli</name>
<email>ananth@in.ibm.com</email>
</author>
<published>2006-04-20T09:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7522a8423bed9931cbac5502b9c0657bde2700ea'/>
<id>7522a8423bed9931cbac5502b9c0657bde2700ea</id>
<content type='text'>
In cases where a struct kretprobe's *_handler fields are non-NULL, it is
possible to cause a system crash, due to the possibility of calls ending up
in zombie functions.  Documentation clearly states that unused *_handlers
should be set to NULL, but kprobe users sometimes fail to do so.

Fix it by setting the non-relevant fields of the struct kretprobe to NULL.

Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In cases where a struct kretprobe's *_handler fields are non-NULL, it is
possible to cause a system crash, due to the possibility of calls ending up
in zombie functions.  Documentation clearly states that unused *_handlers
should be set to NULL, but kprobe users sometimes fail to do so.

Fix it by setting the non-relevant fields of the struct kretprobe to NULL.

Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kretprobe instance recycled by parent process</title>
<updated>2006-03-26T16:57:04+00:00</updated>
<author>
<name>bibo mao</name>
<email>bibo_mao@linux.intel.com</email>
</author>
<published>2006-03-26T09:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c6fd91f0bdcd294a0ae0ba2b2a7f7456ef4b7144'/>
<id>c6fd91f0bdcd294a0ae0ba2b2a7f7456ef4b7144</id>
<content type='text'>
When kretprobe probes the schedule() function, if the probed process exits
then schedule() will never return, so some kretprobe instances will never
be recycled.

In this patch the parent process will recycle retprobe instances of the
probed function and there will be no memory leak of kretprobe instances.

Signed-off-by: bibo mao &lt;bibo.mao@intel.com&gt;
Cc: Masami Hiramatsu &lt;hiramatu@sdl.hitachi.co.jp&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@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When kretprobe probes the schedule() function, if the probed process exits
then schedule() will never return, so some kretprobe instances will never
be recycled.

In this patch the parent process will recycle retprobe instances of the
probed function and there will be no memory leak of kretprobe instances.

Signed-off-by: bibo mao &lt;bibo.mao@intel.com&gt;
Cc: Masami Hiramatsu &lt;hiramatu@sdl.hitachi.co.jp&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@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] sem2mutex: kprobes</title>
<updated>2006-03-23T15:38:12+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-03-23T11:00:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7a7d1cf95408863a657035701606b13644c9f55e'/>
<id>7a7d1cf95408863a657035701606b13644c9f55e</id>
<content type='text'>
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Kprobes: Fix deadlock in function-return probes</title>
<updated>2006-02-03T16:32:00+00:00</updated>
<author>
<name>Ananth N Mavinakayanahalli</name>
<email>ananth@in.ibm.com</email>
</author>
<published>2006-02-03T11:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=278ff9537030bbb292b33504f5e1f6e0126793eb'/>
<id>278ff9537030bbb292b33504f5e1f6e0126793eb</id>
<content type='text'>
When two function-return probes are inserted on kfree()[1] and the second
on say, sys_link()[2], and later [2] is unregistered, we have a deadlock as
kfree is called with the kretprobe_lock held and the function-return probe
on kfree will also try to grab the same lock.

However, we can move the kfree() during unregistration to outside the
spinlock as we are sure that no instances from the free list will be used
after synchronized_sched() returns during the unregistration process.
Thanks to Masami Hiramatsu for spotting this.

Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When two function-return probes are inserted on kfree()[1] and the second
on say, sys_link()[2], and later [2] is unregistered, we have a deadlock as
kfree is called with the kretprobe_lock held and the function-return probe
on kfree will also try to grab the same lock.

However, we can move the kfree() during unregistration to outside the
spinlock as we are sure that no instances from the free list will be used
after synchronized_sched() returns during the unregistration process.
Thanks to Masami Hiramatsu for spotting this.

Signed-off-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kernel/kprobes.c: fix a warning #ifndef ARCH_SUPPORTS_KRETPROBES</title>
<updated>2006-02-03T16:32:00+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2006-02-03T11:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e65cefe87beda627c0bfba39b387ee4bffedc93c'/>
<id>e65cefe87beda627c0bfba39b387ee4bffedc93c</id>
<content type='text'>
kernel/kprobes.c:353: warning: 'pre_handler_kretprobe' defined but not used

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Acked-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: "Keshavamurthy, Anil S" &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kernel/kprobes.c:353: warning: 'pre_handler_kretprobe' defined but not used

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Acked-by: Ananth N Mavinakayanahalli &lt;ananth@in.ibm.com&gt;
Acked-by: "Keshavamurthy, Anil S" &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] kprobes: fix unloading of self probed module</title>
<updated>2006-01-12T02:42:12+00:00</updated>
<author>
<name>Keshavamurthy Anil S</name>
<email>anil.s.keshavamurthy@intel.com</email>
</author>
<published>2006-01-11T20:17:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df019b1d8b893d0f0ee5a9b0f71486f0892561ae'/>
<id>df019b1d8b893d0f0ee5a9b0f71486f0892561ae</id>
<content type='text'>
When a kprobes modules is written in such a way that probes are inserted on
itself, then unload of that moudle was not possible due to reference
couning on the same module.

The below patch makes a check and incrementes the module refcount only if
it is not a self probed module.

We need to allow modules to probe themself for kprobes performance
measurements

This patch has been tested on several x86_64, ppc64 and IA64 architectures.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a kprobes modules is written in such a way that probes are inserted on
itself, then unload of that moudle was not possible due to reference
couning on the same module.

The below patch makes a check and incrementes the module refcount only if
it is not a self probed module.

We need to allow modules to probe themself for kprobes performance
measurements

This patch has been tested on several x86_64, ppc64 and IA64 architectures.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
