This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
RE: [kprobe bug] pre-handler changes on globals lost
- From: "Lynch, Rusty" <rusty dot lynch at intel dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, <systemtap at sources dot redhat dot com>
- Date: Thu, 16 Jun 2005 09:01:09 -0700
- Subject: RE: [kprobe bug] pre-handler changes on globals lost
From: systemtap-owner@sources.redhat.com [mailto:systemtap-
>Hi -
>
>Rusty, what happens if you insert some code into the pre_handler, to
>check that it actually executed?
I have been playing around with several different mechanisms that expose
the bug (the example was just the simplest way I could find that exposes
the bug), and I am convinced the handler really is getting called. It's
like we are updating the wrong location in memory.
>
>How come you use kallsyms_lookup_name("target1") instead of
>simply "& target1" in the kprobe breakpoint address calculation?
That's just out of habit, since you have to do that if you are using a
symbol that is not provided in the module. In this case the
kallsyms_lookup_name() is not needed, but it doesn't change the behavior
for this bug.
Oh yea, and when you are doing this for ia64 kallsyms_lookup_name() is
very nice to use since it returns the actual address of the function,
and not a pointer to a function containing the function address and a
global pointer.
>
>- FChE