From: "Jan Beulich" Subject: [PATCH] use 64-bit arithmetic in reserve_in_boot_e820() Date: Tue, 19 Jun 2007 11:36:33 +0200 Message-ID: <4677BFC1.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Signed-off-by: Jan Beulich Index: 2007-06-18/xen/arch/x86/setup.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-06-18.orig/xen/arch/x86/setup.c 2007-06-18 12:15:35.0000000= 00 +0200 +++ 2007-06-18/xen/arch/x86/setup.c 2007-06-19 11:13:50.000000000 = +0200 @@ -295,14 +295,14 @@ static struct e820map __initdata boot_e8 /* Reserve area (@s,@e) in the temporary bootstrap e820 map. */ static void __init reserve_in_boot_e820(unsigned long s, unsigned long e) { - unsigned long rs, re; int i; =20 for ( i =3D 0; i < boot_e820.nr_map; i++ ) { /* Have we found the e820 region that includes the specified = range? */ - rs =3D boot_e820.map[i].addr; - re =3D boot_e820.map[i].addr + boot_e820.map[i].size; + uint64_t rs =3D boot_e820.map[i].addr; + uint64_t re =3D rs + boot_e820.map[i].size; + if ( (s < rs) || (e > re) ) continue; =20