[BUG][PATCH]Kprobes - No probes on critical path

From: Keshavamurthy Anil S
Date: Fri Dec 09 2005 - 14:29:13 EST


[BUG][PATCH]Kprobes - No probes on critical path

For Kprobes critical path is the path from debug break exception
handler till the control reaches kprobes exception code. No probes
can be supported in this path as we will end up in recursion.

This patch prevents this by moving the below function to safe
__kprobes section onto which no probes can be inserted.

Please apply.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@xxxxxxxxx>
---------------------------------------------------------------
kernel/sys.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.15-rc5-mm1/kernel/sys.c
===================================================================
--- linux-2.6.15-rc5-mm1.orig/kernel/sys.c
+++ linux-2.6.15-rc5-mm1/kernel/sys.c
@@ -32,6 +32,7 @@

#include <linux/compat.h>
#include <linux/syscalls.h>
+#include <linux/kprobes.h>

#include <asm/uaccess.h>
#include <asm/io.h>
@@ -168,7 +169,7 @@ EXPORT_SYMBOL(notifier_chain_unregister)
* of the last notifier function called.
*/

-int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)
+int __kprobes notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)
{
int ret=NOTIFY_DONE;
struct notifier_block *nb = *n;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/