From 0f95b7fc839bc3272b1bf2325d8748a649bd3534 Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Tue, 8 May 2007 00:28:27 -0700 Subject: Kprobes: print details of kretprobe on assertion failure In certain cases like when the real return address can't be found or when the number of tracked calls to a kretprobed function is less than the number of returns, we may not be able to find the correct return address after processing a kretprobe. Currently we just do a BUG_ON, but no information is provided about the actual failing kretprobe. Print out details of the kretprobe before calling BUG(). Signed-off-by: Ananth N Mavinakayanahalli Cc: Prasanna S Panchamukhi Cc: Jim Keniston Cc: Anil S Keshavamurthy Cc: Maneesh Soni Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/i386') diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index e00f75e..3fbef28 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -449,8 +449,7 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs) break; } - BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); - + kretprobe_assert(ri, orig_ret_address, trampoline_address); spin_unlock_irqrestore(&kretprobe_lock, flags); hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { -- cgit v1.1