This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Stap is translating to functions in __exit sections...and later module load fails
- From: Keshavamurthy Anil S <anil dot s dot keshavamurthy at intel dot com>
- To: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- Cc: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Mao, Bibo" <bibo dot mao at intel dot com>, Eugeniy Meshcheryakov <eugeniy dot meshcheryakov at googlemail dot com>, Systemtap <systemtap at sources dot redhat dot com>
- Date: Wed, 18 Oct 2006 14:55:42 -0700
- Subject: Re: Stap is translating to functions in __exit sections...and later module load fails
- References: <C56DB814FAA30B418C75310AC4BB279DC8B1DB@scsmsx413.amr.corp.intel.com>
- Reply-to: Keshavamurthy Anil S <anil dot s dot keshavamurthy at intel dot com>
On Tue, Oct 17, 2006 at 06:06:23PM -0700, Stone, Joshua I wrote:
> On Tuesday, October 17, 2006 5:52 PM, Keshavamurthy, Anil S wrote:
> > After commenting (i.e not discarding) *(.exit.text) from
> > arch/ia64/kernel/vmlinux.lds.S file and booting with this new
> > kernel, stap ignores functions in __exit sections and elaborates
> > and translates functions properly.
>
> The issue in stap/elfutils when __exit is discarded is that it can't
> locate the function properly. It knows there's a function called
> 'exit_pfm_fs', but since it can't figure the probe address for the
> function (since it was discarded), stap gets an address of 0x0. Then
> blacklist_p tries to figure out what section that's in, and if that
> section is .exit.*, the function is rejected. (Rejection in the case of
> function("*") just means it is skipped, not an error.) In this case the
> section is not .exit.* -- or rather, we don't know what section it's in
> -- so the probe is added to the list.
>
> Perhaps the simple solution would be to treat a probe address with an
> *unknown* section as blacklisted as well. If we don't know what it is,
> it probably isn't safe, right?
Yup, I agree with you.
>
> > Can someone tell me why this section is not discarded on Ia32?
>
> Not me. But what is the point of __exit functions if they are always
> discarded? Wouldn't you think that __exit should be kept around for
> when the kernel exits?
If anything is inbuilt into kernel, then their is no way
its __exit functions are called, hence it can be safely
discarded in the vmlinux.
thanks,
Anil