From: "Scott Parish" <srparish@us.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [patch] pae u32 overflow in xc_linux_build.c (bug 242)
Date: Tue, 11 Oct 2005 23:07:35 +0000 [thread overview]
Message-ID: <20051011230734.GI3417@us.ibm.com> (raw)
[-- 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
reply other threads:[~2005-10-11 23:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051011230734.GI3417@us.ibm.com \
--to=srparish@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.