From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvPfu-0005Qr-2V for qemu-devel@nongnu.org; Sat, 06 Jul 2013 06:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvPfp-00076d-3J for qemu-devel@nongnu.org; Sat, 06 Jul 2013 06:25:06 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:42742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvPfo-00076K-TQ for qemu-devel@nongnu.org; Sat, 06 Jul 2013 06:25:01 -0400 Received: by mail-lb0-f181.google.com with SMTP id w10so2621535lbi.12 for ; Sat, 06 Jul 2013 03:24:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1373070978-11966-3-git-send-email-agraf@suse.de> References: <1373070978-11966-1-git-send-email-agraf@suse.de> <1373070978-11966-3-git-send-email-agraf@suse.de> From: Peter Maydell Date: Sat, 6 Jul 2013 11:24:39 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 2/9] linux-user: Add is_write segfault check for ARM hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Riku Voipio , qemu-devel@nongnu.org On 6 July 2013 01:36, Alexander Graf wrote: > When we get a segmentation fault we check whether the fault was a write. If > it was a write, it might be a fault because we tried to modify a code region. > > This logic does not work on ARM hosts, because they don't evaluate whether a > segementation fault is due to a write. Instead they always declare it a read. > > So self modifying code fails with a segmentation fault whenever it tries to > modify itself. > > Add the is_write evaluation based on what the kernel tells us as fault reason. > > Signed-off-by: Alexander Graf We've already got a patch for this on list : http://patchwork.ozlabs.org/patch/248590/ thanks -- PMM