From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R46Wd-0007r7-Ho for qemu-devel@nongnu.org; Thu, 15 Sep 2011 03:38:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R46Wc-0007h2-Ii for qemu-devel@nongnu.org; Thu, 15 Sep 2011 03:38:23 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:35730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R46Wc-0007gm-EO for qemu-devel@nongnu.org; Thu, 15 Sep 2011 03:38:22 -0400 Received: by wwg14 with SMTP id 14so2965671wwg.10 for ; Thu, 15 Sep 2011 00:38:20 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E71AB6B.7040900@redhat.com> Date: Thu, 15 Sep 2011 09:38:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1315983769-8287-1-git-send-email-david@gibson.dropbear.id.au> <4E70647D.10408@redhat.com> <20110915023431.GO9025@yookeroo.fritz.box> In-Reply-To: <20110915023431.GO9025@yookeroo.fritz.box> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Fix subtle integer overflow bug in memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity , agraf@suse.de, anthony@codemonkey.ws, qemu-devel@nongnu.org On 09/15/2011 04:34 AM, David Gibson wrote: > explicit "if (a + b)< a" tests in some places. Please wrap these in a macro, since the addition has to be done in an unsigned type. Otherwise overflow is undefined. Paolo