From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26124 invoked by alias); 14 Nov 2006 18:33:38 -0000 Received: (qmail 26055 invoked by uid 22791); 14 Nov 2006 18:33:34 -0000 X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Nov 2006 18:33:17 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by mga09.intel.com with ESMTP; 14 Nov 2006 10:33:06 -0800 Received: from scsmsx331.sc.intel.com (HELO scsmsx331.amr.corp.intel.com) ([10.3.90.4]) by orsmga001.jf.intel.com with ESMTP; 14 Nov 2006 10:33:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,421,1157353200"; d="scan'208"; a="161404779:sNHT28984074" Received: from scsmsx413.amr.corp.intel.com ([10.3.90.32]) by scsmsx331.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 14 Nov 2006 10:33:05 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Pointer chain paranoia Date: Tue, 14 Nov 2006 18:36:00 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Pointer chain paranoia Thread-Index: AccIEKWNPM6GLJCqSqW0ukLHJlVgOwAB8imQ From: "Stone, Joshua I" To: "Mike Mason" , X-OriginalArrivalTime: 14 Nov 2006 18:33:05.0007 (UTC) FILETIME=[52D357F0:01C7081B] 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/msg00422.txt.bz2 On Tuesday, November 14, 2006 9:15 AM, Mike Mason wrote: > I'm looking for opinions from the systemtap community... How paranoid > should we be when following pointer chains in tapsets and scripts? I > think we should use deref() unless we're absolutely sure there's no > chance of referencing a null or bad pointer, but, of course, that'll > add a lot of code. I'm not sure how you can ever be absolutely sure, > particularly for longer chains. What guidance should we give tapset > and script writers?=20=20=20=20=20=20 >=20 > Mike I agree with you. Safety is always more important than efficiency, especially in tapsets which may be used by non-guru users. Any questionable pointers should be carefully dereferenced, e.g., parameters passed to functions should be assumed bogus. When a pointer is known to originate from a kernel source, like from 'current' or as a return value from a kernel function, then we might relax a bit. Josh