From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4886 invoked by alias); 10 Feb 2006 05:39:35 -0000 Received: (qmail 4273 invoked by uid 22791); 10 Feb 2006 05:39:33 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Feb 2006 05:39:30 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k1A5dSBI019183 for ; Fri, 10 Feb 2006 00:39:28 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k1A5dS108670; Fri, 10 Feb 2006 00:39:28 -0500 Received: from vpn83-159.boston.redhat.com (vpn83-159.boston.redhat.com [172.16.83.159]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id k1A5dQOb009922; Fri, 10 Feb 2006 00:39:27 -0500 Subject: Re: kprobe fault handling From: Martin Hunt To: Jim Keniston Cc: prasanna@in.ibm.com, Richard J Moore , suparna@in.ibm.com, "systemtap@sources.redhat.com" In-Reply-To: <1139522818.4127.15.camel@monkey2> References: <20060208043831.GA9313@in.ibm.com> <20060209072338.GA2902@in.ibm.com> <1139520938.2779.171.camel@dyn9047018079.beaverton.ibm.com> <1139522818.4127.15.camel@monkey2> Content-Type: multipart/mixed; boundary="=-Z8ql6G0otPQ/mXBk79b0" Organization: Red Hat Inc Date: Fri, 10 Feb 2006 05:39:00 -0000 Message-Id: <1139550026.4025.4.camel@monkey2> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-25) X-Virus-Checked: Checked by ClamAV on sourceware.org 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/msg00465.txt.bz2 --=-Z8ql6G0otPQ/mXBk79b0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 408 Maybe I should post one of my test programs. The attached one crashes on my i686 system running an SMP kernel in a couple of seconds. On non-SMP kernels, it prints a bunch of junk to syslog but doesn't seem to crash, although I haven't tested it much. With my simple fixup_exception patch to the handler, it runs perfectly. I've modified it to keep looping through the address space and run it for hours. --=-Z8ql6G0otPQ/mXBk79b0 Content-Disposition: attachment; filename=mem_test.stp Content-Type: text/plain; name=mem_test.stp; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 619 # Memory test. Tries userspace copies covering # the entire 32-bit address space. global addr %{ static char buf[16384]; %} function copy_more:long(addr:long) %{ THIS->__retvalue = _stp_copy_from_user (buf, (char __user *)(long)THIS->addr, 2048); %} probe kernel.function("sys_read") { printf("copying from %x ... ", addr) ret = copy_more(addr) if (ret < 2048) printf("FAILED (%d)\n", ret) else printf("GOOD\n") addr += 4096 if (addr > 0xffffffff) exit() } probe end { printf("\nDONE. Test succeeded if you see this and there\n") printf("are no might_sleep warnings in the system log.\n") } --=-Z8ql6G0otPQ/mXBk79b0--