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

[Xen-devel] [PATCH] restrict trace buffer MFNs

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] restrict trace buffer MFNs
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Mon, 28 Jun 2010 11:42:13 +0100
Delivery-date: Mon, 28 Jun 2010 03:42:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Since they're being passed to Dom0 using an array of uint32_t, they
must be representable as 32-bit quantities, and hence the buffer
allocation must specify an upper address boundary.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-06-15.orig/xen/common/trace.c  2010-06-28 11:58:37.000000000 +0200
+++ 2010-06-15/xen/common/trace.c       2010-06-28 12:16:05.000000000 +0200
@@ -130,7 +130,8 @@ static int alloc_trace_bufs(void)
         char         *rawbuf;
         struct t_buf *buf;
 
-        if ( (rawbuf = alloc_xenheap_pages(order, 0)) == NULL )
+        if ( (rawbuf = alloc_xenheap_pages(
+                order, MEMF_bits(32 + PAGE_SHIFT))) == NULL )
         {
             printk("Xen trace buffers: memory allocation failed\n");
             opt_tbuf_size = 0;



Attachment: trace-restrict-mfn.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>