From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5874 invoked by alias); 12 Jan 2007 05:32:16 -0000 Received: (qmail 5866 invoked by uid 22791); 12 Jan 2007 05:32:16 -0000 X-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_40,DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e36.co.us.ibm.com (HELO e36.co.us.ibm.com) (32.97.110.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 12 Jan 2007 05:32:09 +0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e36.co.us.ibm.com (8.13.8/8.12.11) with ESMTP id l0C5W6lS001567 for ; Fri, 12 Jan 2007 00:32:06 -0500 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id l0C5W6QH331322 for ; Thu, 11 Jan 2007 22:32:06 -0700 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 l0C5W6dg015689 for ; Thu, 11 Jan 2007 22:32:06 -0700 Received: from thinktux.in.ibm.com ([9.124.96.84]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l0C5W4Yj015601; Thu, 11 Jan 2007 22:32:05 -0700 Received: from thinktux.in.ibm.com (localhost.localdomain [127.0.0.1]) by thinktux.in.ibm.com (Postfix) with ESMTP id 622AEE7A1B; Fri, 12 Jan 2007 11:01:59 +0530 (IST) Received: (from ananth@localhost) by thinktux.in.ibm.com (8.13.1/8.13.1/Submit) id l0C5Vvtb017012; Fri, 12 Jan 2007 11:01:57 +0530 Date: Fri, 12 Jan 2007 05:32:00 -0000 From: Ananth N Mavinakayanahalli To: rsmadhvesh@vsnl.net Cc: systemtap@sources.redhat.com, madhvesh.s@ap.sony.com, lubna@ap.sony.com, satish.v@ap.sony.com Subject: Re: Kprobes Support for ARM arch Message-ID: <20070112053157.GA7437@in.ibm.com> Reply-To: ananth@in.ibm.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 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: 2007-q1/txt/msg00082.txt.bz2 On Thu, Jan 11, 2007 at 07:58:07PM +0500, rsmadhvesh@vsnl.net wrote: Hi Madhvesh, > Hi All, > > Recently we completed the kprobes support for ARM architecture > targetted at 2.6.16 kernel. I have uploaded these patches in the > below CELF wiki page along with few test programs. > This implementation is tested using 2.6.16-24 kernel for > OMAP5912 OSK reference platform. I am not familiar with the ARM architecture details... the following comments are from a quick glance at the patch. > The patch is available in the below CELF wiki page > http://tree.celinuxforum.org/CelfPubWiki/PatchArchive > > The patch can be downloaded directly from here > http://tree.celinuxforum.org/CelfPubWiki/PatchArchive?action=AttachFile&do=get&target=kprobes-arm-patches-2.6.16.24.tgz > > This implementation supports only kprobes and doesnot > support any other variants like jprobes, kretprobes etc. > Also it doesnot support branch/jump instructions probing. How are you ensuring that a kprobe register request on a branch/jump instruction fails? I don't see any profiling done to verify what the underlying instruction is. See arch_prepare_kprobe() from the powerpc port as to how we fail kprobe registration on certain instructions. > I noticed some discussions regarding ARM kprobes in the > archive. We are open to suggestions and how this implementation can > be improved. Given that quite a bit of the kprobes code for any platform is architecture specific, its important that your code gets reviewed by the ARM kernel gurus/maintainers, if you intend that the patch be included in the mainline Linux kernels. Also, you may want to port the patch to the latest kernel. There have been some interface changes: - kprobe modules are more portable with the addition of in-kernel symbol lookup. - The page fault case gets its own notifier so there isn't a penalty paid when kprobes aren't in use. Good work! Ananth