From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9217 invoked by alias); 18 Oct 2006 22:15:58 -0000 Received: (qmail 9210 invoked by uid 22791); 18 Oct 2006 22:15:58 -0000 X-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mga05.intel.com (HELO fmsmga101.fm.intel.com) (192.55.52.89) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Oct 2006 22:15:56 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 18 Oct 2006 15:15:49 -0700 Received: from unix-os.sc.intel.com ([172.25.110.7]) by fmsmga001.fm.intel.com with ESMTP; 18 Oct 2006 15:15:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,325,1157353200"; d="scan'208"; a="148613470:sNHT389675412" Received: (from askeshav@localhost) by unix-os.sc.intel.com (8.11.6/8.11.2) id k9ILtga27869; Wed, 18 Oct 2006 14:55:42 -0700 Date: Wed, 18 Oct 2006 22:15:00 -0000 From: Keshavamurthy Anil S To: "Stone, Joshua I" Cc: "Keshavamurthy, Anil S" , "Mao, Bibo" , Eugeniy Meshcheryakov , Systemtap Subject: Re: Stap is translating to functions in __exit sections...and later module load fails Message-ID: <20061018145542.C27693@unix-os.sc.intel.com> Reply-To: Keshavamurthy Anil S References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from joshua.i.stone@intel.com on Tue, Oct 17, 2006 at 06:06:23PM -0700 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00172.txt.bz2 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