From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cw9mz-0002P6-GI for qemu-devel@nongnu.org; Tue, 01 Feb 2005 20:58:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cw9mp-0002Jf-6M for qemu-devel@nongnu.org; Tue, 01 Feb 2005 20:58:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cw9ml-0002Eg-Qu for qemu-devel@nongnu.org; Tue, 01 Feb 2005 20:58:27 -0500 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cw9I2-0003dH-QJ for qemu-devel@nongnu.org; Tue, 01 Feb 2005 20:26:43 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Armv5 target Date: Wed, 2 Feb 2005 01:26:37 +0000 References: <200501312019.45282.paul@codesourcery.com> <20050131224414.GA28203@xi.wantstofly.org> <200501312313.38869.paul@codesourcery.com> In-Reply-To: <200501312313.38869.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502020126.38386.paul@codesourcery.com> 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 > > + /* 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). However I don't think this is the best solution. arm-linux has an instruction cache flush syscall, so we should be hooking into that instead. Paul