From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6qMD-00044T-10 for qemu-devel@nongnu.org; Fri, 06 Jul 2007 12:08:33 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6qMC-00044E-Jt for qemu-devel@nongnu.org; Fri, 06 Jul 2007 12:08:32 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I6qMC-00015v-6k for qemu-devel@nongnu.org; Fri, 06 Jul 2007 12:08:32 -0400 Received: from [172.17.17.9] (gw.netgem.com [195.68.2.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 5EDE73318A for ; Fri, 6 Jul 2007 18:08:24 +0200 (CEST) Message-ID: <468E68F7.8070005@bellard.org> Date: Fri, 06 Jul 2007 18:08:23 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] linux-user EFAULT implementation References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Please update page_check_range() (and other related functions) to return -EFAULT instead of EFAULT in case of error. Moreover, I believe using similar functions as Linux for memory access (copyfromuser, copytouser, get_user, put_user) would be cleaner. Regards, Fabrice. Stuart Anderson wrote: > > Here is a refresh of the linux-user EFAULT patch vs todays cvs. This > patch has now received a lot more runtime, and a couple of bug have been > fixed that affected some of the socket APIs. > > The purpose of this patch is to detect bad pointers and return EFAULT > instead of just crashing when the bad pointers are used by qemu. > > > Stuart