From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31192 invoked by alias); 28 Sep 2009 18:12:55 -0000 Received: (qmail 31123 invoked by uid 22791); 28 Sep 2009 18:12:55 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e37.co.us.ibm.com (HELO e37.co.us.ibm.com) (32.97.110.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Sep 2009 18:12:48 +0000 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e37.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id n8SIBmSI020599 for ; Mon, 28 Sep 2009 12:11:48 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n8SICZA6075724 for ; Mon, 28 Sep 2009 12:12:35 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n8SICV08031374 for ; Mon, 28 Sep 2009 12:12:31 -0600 Received: from [9.47.18.61] (w-jimk.beaverton.ibm.com [9.47.18.61]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n8SICTKD031254; Mon, 28 Sep 2009 12:12:29 -0600 Subject: Re: [PATCH v2] Tracepoint Tapset for Memory Subsystem From: Jim Keniston To: David Smith Cc: Rajasekhar Duddu , systemtap@sources.redhat.com In-Reply-To: <4ABD17B5.6080500@redhat.com> References: <20090919050102.GA3767@rajduddu> <4AB90BE0.4030405@redhat.com> <4AB94A1B.4090801@redhat.com> <20090924180817.GA9698@rajduddu> <4ABD17B5.6080500@redhat.com> Content-Type: text/plain Date: Mon, 28 Sep 2009 18:12:00 -0000 Message-Id: <1254161548.5107.14.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00878.txt.bz2 On Fri, 2009-09-25 at 14:19 -0500, David Smith wrote: ... > > Sorry to keep finding more things, but... > > I'm a bit worried about your use of '__builtin_return_address()' here. > Jim Keniston reported on it back in 2005 in the following message, but > there isn't much context. > > > > Jim, can you remember some context here? Was the use of > '__builtin_return_address' considered good/bad/neutral? We don't seem > to use it anywhere else. > In case anybody still cares... The context was that we had recently implemented kretprobes, and somebody pointed out that hijacking the return address would cause __builtin_return_address() to return the wrong value. From my survey of the kernel, I concluded that "__builtin_return_address is used entirely for tracing (tracing that is disabled by default), profiling, and error reporting. I couldn't find any case where normal operation of the OS would be affected." Ironically, soon after that, kprobes itself started using __builtin_return_address(). Anyway, there was no controversy as to whether __builtin_return_address() was bad or good per se; it was simply recognized that it would return invalid results when called from a return-probed function. Jim