[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: clear FB content since _xmalloc may return non-zeroed memory
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |