summaryrefslogtreecommitdiff
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
authorKeshavamurthy Anil S <anil.s.keshavamurthy@intel.com>2005-12-12 00:37:33 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-12 08:57:45 -0800
commit00d7c05ab168c10f9b520e07400923267bc04419 (patch)
tree5899743965a801e34e7dc6bfe59dba20ba023540 /include/linux/kprobes.h
parentcda315aba34ff4fb66bbb2945b723688f3414a75 (diff)
[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. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index e373c4a9de53..434ecfd7cf48 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -37,6 +37,7 @@
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
+#ifdef CONFIG_KPROBES
#include <asm/kprobes.h>
/* kprobe_status settings */
@@ -147,7 +148,6 @@ struct kretprobe_instance {
struct task_struct *task;
};
-#ifdef CONFIG_KPROBES
extern spinlock_t kretprobe_lock;
extern int arch_prepare_kprobe(struct kprobe *p);
extern void arch_copy_kprobe(struct kprobe *p);
@@ -195,6 +195,11 @@ void add_rp_inst(struct kretprobe_instance *ri);
void kprobe_flush_task(struct task_struct *tk);
void recycle_rp_inst(struct kretprobe_instance *ri);
#else /* CONFIG_KPROBES */
+
+#define __kprobes /**/
+struct jprobe;
+struct kretprobe;
+
static inline struct kprobe *kprobe_running(void)
{
return NULL;