From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28116 invoked by alias); 8 Mar 2006 05:13:31 -0000 Received: (qmail 28105 invoked by uid 22791); 8 Mar 2006 05:13:30 -0000 X-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_ABUSE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from e2.ny.us.ibm.com (HELO e2.ny.us.ibm.com) (32.97.182.142) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Mar 2006 05:13:28 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e2.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id k285DP0D006156 for ; Wed, 8 Mar 2006 00:13:25 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k285DP06220152 for ; Wed, 8 Mar 2006 00:13:25 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11/8.13.3) with ESMTP id k285DPMu003938 for ; Wed, 8 Mar 2006 00:13:25 -0500 Received: from newton.in.ibm.com ([9.124.35.47]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id k285DO7T003877; Wed, 8 Mar 2006 00:13:24 -0500 Received: by newton.in.ibm.com (Postfix, from userid 500) id 2F4EBCE3; Wed, 8 Mar 2006 10:44:58 +0530 (IST) Date: Wed, 08 Mar 2006 05:13:00 -0000 From: Prasanna S Panchamukhi To: Keshavamurthy Anil S Cc: systemtap@sources.redhat.com Subject: Re: [1/5 PATCH] Kprobes fix for broken fault handling for i386 Message-ID: <20060308051457.GA4844@in.ibm.com> Reply-To: prasanna@in.ibm.com References: <20060307133832.GA2245@in.ibm.com> <20060307132608.A29873@unix-os.sc.intel.com> <440E07FE.2060804@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <440E07FE.2060804@us.ibm.com> User-Agent: Mutt/1.4.1i 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-q1/txt/msg00731.txt.bz2 Anil, You can use the test script mentioned by Hien below. Also to test the fault handling, you need to just call copy_from_user(), that will generate a page fault. In the post/pre handler allocate a buffer and copy some data from the user address space. copy_from_user(&buf, (unsigned long *)0xbff2d020, 10); where the from address should be a valid user space address. Thanks Prasanna On Tue, Mar 07, 2006 at 02:23:58PM -0800, Hien Nguyen wrote: > Keshavamurthy Anil S wrote: > > >On Tue, Mar 07, 2006 at 05:38:32AM -0800, Prasanna S Panchamukhi wrote: > > > > > >> Hi, > >> > >> Below is the set of patches to fix broken fault handling > >> for i386, x86_64, ppc64, ia64 and sparc64 architectures > >> against 2.6.16-rc5-mm2. > >> > >> These patches are tested for i386 and x86_64 architectures. > >> Could you please test it for ia64 and ppc64. > >> > >> > > > >Prasanna, > > Can you share your test module code here, > >so that the same can be used(with minor tweak, if requred) > >for testing other architecture. Also in you testing, did > >you cover fault handling during pre/post/singlestep > >cases? > > > >Thanks, > >Anil > > > > > > > I tested Prasanna's fault handling patch with the current syscalls > tapset (latest from CVS) which does lots of user copies. Without the > patch the system crashes right away, but with this patch I finally can > test the system calls tapset. > > I use Martin's sys.stp script below > > probe syscall.*, syscall.*.return { > if (pid() == target()) { > if (returnp) > printf("%d\n", returnval()) > else > printf("%s (%s) = ", name, argstr) > } > } > > Invoke the script as follow > stap -c bash sys.stp > to exit the script, just type exit. > > Hien. > > > -- Prasanna S Panchamukhi Linux Technology Center India Software Labs, IBM Bangalore Email: prasanna@in.ibm.com Ph: 91-80-51776329