Skip to contentSkip to conversation

disallow kprobes on notifier_call_chain

PATCH In review bibo,mao 1 participant 1 message Sep 26, 2006

lore
Share & tools
lore

bibo,mao

author
#0 lore raw

PATCH 2/3 disallow kprobes on notifier_call_chain

Hi,

When kprobe is re-entered, the re-entered kprobe kernel path will will call atomic_notifier_call_chain function, if this function is kprobed that will incur numerous kprobe recursive fault. This patch disallows kprobes on atomic_notifier_call_chain function.

thanks
bibo,mao

kernel/sys.c +1 -1
diff -Nruap 2.6.18-mm1.org/kernel/sys.c 2.6.18-mm1/kernel/sys.c
@@ -222,7 +222,7 @@ EXPORT_SYMBOL_GPL(atomic_notifier_chain_
 *	of the last notifier function called.
 */
 
-int atomic_notifier_call_chain(struct atomic_notifier_head *nh,
+int __kprobes atomic_notifier_call_chain(struct atomic_notifier_head *nh,

unsigned long val, void *v)

{
	int ret;