From: Keir Fraser Subject: Re: bitopts functions overflowing page boundarys Date: Sat, 28 May 2005 10:01:27 +0100 Message-ID: References: <20050528044320.GA9951@us.ibm.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20050528044320.GA9951@us.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Scott Parish Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 28 May 2005, at 05:43, Scott Parish wrote: > u.inuse.type_info is at the end of the pfn_info structure, and is > u32 for both x86_32 and x86_64--in this location it can also be the > last 32 bits of a page. > > several functions use bitopts.h functions to manipulate this member, > and > on x86_64 these functions use u64 instructions, which will overflow the > page boundary, and possibly the end of memory as we see here: You really see this in practise? I'm very surprised. The memory map would have to be just big enough that the last pfn_info structure falls at the end of an aligned 2MB boundary. If you reduce max_page by 1, does the problem disappear? -- Keir