This is the mail archive of the systemtap@sourceware.org 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: Stap is translating to functions in __exit sections...and later module load fails


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?

> 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?


Josh


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