This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC -mm][PATCH 5/6] prepare kprobes code for x86 unification

Ananth N Mavinakayanahalli wrote:
On Wed, Dec 12, 2007 at 08:21:01PM -0500, Masami Hiramatsu wrote:
Masami Hiramatsu wrote:
Finally, I reproduced it by executing a command below:
% stap -e 'probe kernel.function("migration_init"){}'

That does seem like the right thing to do. This also needs to live in common code.

Want to take a stab at it?

How about this Ananth ???

Signed-off-by: Srinivasa DS <>

--- kernel/kprobes.c.orig 2007-12-13 13:43:45.000000000 +0530 +++ kernel/kprobes.c 2007-12-13 13:48:32.000000000 +0530 @@ -48,6 +48,7 @@ #include <asm/cacheflush.h> #include <asm/errno.h> #include <asm/uaccess.h> +#include <asm/sections.h>

@@ -722,6 +723,11 @@ int __kprobes register_kretprobe(struct if (addr == NULL)
kprobe_lookup_name(rp->kp.symbol_name, addr);
addr += rp->kp.offset;
+ if (addr >= (unsigned long)_sinittext && + addr <= (unsigned long)_einittext)
+ return -EINVAL;

               for (i = 0; kretprobe_blacklist[i].name != NULL; i++) {
                       if (kretprobe_blacklist[i].addr == addr)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]