WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] [PATCH] Fix possible random return value from find_space

To: Amos Waterland <apw@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] Fix possible random return value from find_space
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Thu, 17 Aug 2006 19:03:18 -0400
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 17 Aug 2006 16:04:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060817223025.GA24660@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060817223025.GA24660@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks Amos.. I adapted it a little bit.. good catch.. pushed.
-JX
On Aug 17, 2006, at 6:30 PM, Amos Waterland wrote:

In find_space, if the user passes zero for the size argument she will
get a random value returned.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 boot_of.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r da9637bef06a xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Thu Aug 17 17:58:07 2006 -0400
+++ b/xen/arch/powerpc/boot_of.c        Thu Aug 17 18:28:02 2006 -0400
@@ -698,7 +698,7 @@ static ulong find_space(u32 size, u32 al
 {
     memory_map_t *map = (memory_map_t *)((ulong)mbi->mmap_addr);
ulong eomem = ((u64)map->length_high << 32) | (u64)map- >length_low;
-    ulong base;
+    ulong base = 0x0;

     if (size == 0) return base;


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>