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-changelog

[Xen-changelog] [xen-unstable] minios: clear FB content since _xmalloc m

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] minios: clear FB content since _xmalloc may return non-zeroed memory
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 May 2008 09:40:13 -0700
Delivery-date: Mon, 12 May 2008 09:40:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1210583445 -3600
# Node ID 4c3140455620fd268c8cb0e7ad6ddcf0be2198af
# Parent  3b20e543b52d40f76525a7e918fa347af2de00fe
minios: clear FB content since _xmalloc may return non-zeroed memory
(in debug mode, notably).

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/kernel.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff -r 3b20e543b52d -r 4c3140455620 extras/mini-os/kernel.c
--- a/extras/mini-os/kernel.c   Mon May 12 10:10:03 2008 +0100
+++ b/extras/mini-os/kernel.c   Mon May 12 10:10:45 2008 +0100
@@ -303,13 +303,10 @@ static void fbfront_thread(void *p)
 
     memsize = n * PAGE_SIZE;
     fb = _xmalloc(memsize, PAGE_SIZE);
+    memset(fb, 0, memsize);
     mfns = xmalloc_array(unsigned long, n);
-    for (i = 0; i < n; i++) {
-        /* trigger CoW */
-        ((char *) fb) [i * PAGE_SIZE] = 0;
-        barrier();
+    for (i = 0; i < n; i++)
         mfns[i] = virtual_to_mfn((char *) fb + i * PAGE_SIZE);
-    }
     fb_dev = init_fbfront(NULL, mfns, WIDTH, HEIGHT, DEPTH, line_length, n);
     xfree(mfns);
     if (!fb_dev) {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] minios: clear FB content since _xmalloc may return non-zeroed memory, Xen patchbot-unstable <=