From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CwPIW-0002QN-Fm for qemu-devel@nongnu.org; Wed, 02 Feb 2005 13:32:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CwPIU-0002Pk-Kg for qemu-devel@nongnu.org; Wed, 02 Feb 2005 13:32:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwPIU-0002PJ-H0 for qemu-devel@nongnu.org; Wed, 02 Feb 2005 13:32:14 -0500 Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CwP5V-0003nD-O2 for qemu-devel@nongnu.org; Wed, 02 Feb 2005 13:18:49 -0500 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 1D1F813F2FFA for ; Wed, 2 Feb 2005 19:18:48 +0100 (CET) From: Ulrich Hecht Subject: Re: [Qemu-devel] Armv5 target Date: Wed, 2 Feb 2005 19:18:47 +0100 References: <200501312019.45282.paul@codesourcery.com> <20050202120109.GB17294@xi.wantstofly.org> <200502021547.24944.paul@codesourcery.com> In-Reply-To: <200502021547.24944.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502021918.47411.uli@suse.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi! On Wednesday 02 February 2005 16:47, Paul Brook wrote: > On Wednesday 02 February 2005 12:01, Lennert Buytenhek wrote: > > On Wed, Feb 02, 2005 at 01:26:37AM +0000, Paul Brook wrote: > > > > > + /* XXX: locking issue */ > > > > > + if (is_write && page_unprotect(address, pc, puc)) { > > > > > + return 1; > > > > > + } > > > > > /* XXX: do more */ > > > > > return 0; > > > > > } > > > > > > > > Sort of. Self-modifying code (e.g. stack trampolines) are still > > > > broken, and the patch above should work. > > > > > > > > However I just tested it and it doesn't seem to work any more. > > > > It seems that the SEGV handler is being passed an address of 0, > > > > rather than the actual faulting location. > > > > > > > > This may be a host kernel/libc bug. > > > > > > I just tried on a few different machines, and this is a host > > > kernel bug specific to one particular kernel (custom 2.6.9). > > > > Do you have some example code that demonstrates this? > > I've attached two programs. segv-test.c tests for the kernel bug. This program hangs in an endless segfault loop when I run it in qemu-arm. The kernel version does not seem to matter here, I have tried 2.6.11, 2.6.5 and 2.4.21. Has anybody ever observed this and/or knows what it is caused by? (The test works fine on i386 and on a real ARM machine.) CU Uli