* [patch] pae u32 overflow in xc_linux_build.c (bug 242)
@ 2005-10-11 23:07 Scott Parish
0 siblings, 0 replies; only message in thread
From: Scott Parish @ 2005-10-11 23:07 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
While this doesn't entirely solve bug 242, the attached patch gets us
further.
sRp
--
Scott Parish
Signed-off-by: srparish@us.ibm.com
[-- Attachment #2: xc_linux_build-overflow.diff --]
[-- Type: text/plain, Size: 847 bytes --]
diff -rN -pu old-xen-build2/tools/libxc/xc_linux_build.c new-xen-build2/tools/libxc/xc_linux_build.c
--- old-xen-build2/tools/libxc/xc_linux_build.c 2005-10-04 19:08:38.000000000 +0000
+++ new-xen-build2/tools/libxc/xc_linux_build.c 2005-10-11 22:24:34.000000000 +0000
@@ -500,11 +500,11 @@ static int setup_guest(int xc_handle,
_p(dsi.v_start), _p(v_end));
printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));
- if ( (v_end - dsi.v_start) > (nr_pages * PAGE_SIZE) )
+ if ( ((v_end - dsi.v_start)>>PAGE_SHIFT) > nr_pages )
{
printf("Initial guest OS requires too much space\n"
"(%luMB is greater than %luMB limit)\n",
- (v_end-dsi.v_start)>>20, (nr_pages<<PAGE_SHIFT)>>20);
+ (v_end-dsi.v_start)>>20, nr_pages>>(20-PAGE_SHIFT));
goto error_out;
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-11 23:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11 23:07 [patch] pae u32 overflow in xc_linux_build.c (bug 242) Scott Parish
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.