From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NruI8-0001Wk-8X for qemu-devel@nongnu.org; Wed, 17 Mar 2010 10:32:12 -0400 Received: from [199.232.76.173] (port=38400 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NruI7-0001WX-SP for qemu-devel@nongnu.org; Wed, 17 Mar 2010 10:32:11 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NruI5-0004vA-Dk for qemu-devel@nongnu.org; Wed, 17 Mar 2010 10:32:11 -0400 Received: from are.twiddle.net ([75.149.56.221]:43595) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NruI5-0004v6-4J for qemu-devel@nongnu.org; Wed, 17 Mar 2010 10:32:09 -0400 Message-ID: <4BA0E7E6.4060304@twiddle.net> Date: Wed, 17 Mar 2010 07:32:06 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/6] Multi-level page tables and userland mapping fixes, v3 References: <201003151346.10470.dl9pf@gmx.de> <20100315144803.GA1895@afflict.kos.to> <201003151608.46624.dl9pf@gmx.de> <20100317114807.GA13278@afflict.kos.to> In-Reply-To: <20100317114807.GA13278@afflict.kos.to> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: Martin Mohring , Aurelien Jarno , qemu-devel@nongnu.org, =?UTF-8?B?SmFuLVNpbW9uIE3DtmxsZXI=?= On 03/17/2010 04:48 AM, Riku Voipio wrote: >>> page_check_range: >>> >>> - if (start + len < start) >>> - /* we've wrapped around */ >>> ... >>> + if (start + len - 1 < start) { >>> + /* We've wrapped around. */ >>> >>> This now blows up with len = 0; > >> Confirmed. A quick test with if (len > 0) around and ldconfig.real runs. > > Richard, would you be ok with that change? Or should we rather have explicit > > if (len == 0) return 0; My personal preference is if (len != 0 && start + len - 1 < start) but don't let that stop anyone checking in any correct variant. r~