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] pin ctxt in xc_domain_getfullinfo

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] pin ctxt in xc_domain_getfullinfo
From: Kip Macy <kip.macy@xxxxxxxxx>
Date: Fri, 22 Apr 2005 13:49:07 -0700
Delivery-date: Fri, 22 Apr 2005 20:48:54 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NqgkQtvFeePa4xyPJfJvuJNX20Pd/6z/WVI2NDJGpsEXTPis1D5mbCBdHb6NNU4DwMVBbuP0Ifbhkrac1BmSfJaU/IweFR95f/XjoxnEH4an3I3iABTAT7d0sEOtsTlbNtLubooQYq3gdylYB41Fq/Hf6ihtfexEK+dZVtVi818=
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Kip Macy <kip.macy@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/04/22 13:45:41-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx 
#   mlock ctxt in xc_domain_getfullinfo
#   this is the most general solution to the recent problem seen in xc_ptrace
#   Signed-off-by: Kip Macy <kmacy@xxxxxxxxxxx>
# 
# tools/libxc/xc_domain.c
#   2005/04/22 13:45:38-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +7 -0
#   mlock ctxt in xc_domain_getfullinfo
# 
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-04-21 13:52:32 -07:00
+++ b/tools/libxc/xc_domain.c   2005-04-21 13:52:32 -07:00
@@ -134,7 +134,14 @@
     op.u.getdomaininfo.exec_domain = (u16)vcpu;
     op.u.getdomaininfo.ctxt = ctxt;
 
+    if ( ctxt ) 
+       if ( mlock(ctxt, sizeof(*ctxt)) != 0 )
+           return -1;
+
     rc = do_dom0_op(xc_handle, &op);
+    
+    if ( ctxt )
+       munlock(ctxt, sizeof(*ctxt));
 
     if ( info )
         memcpy(info, &op.u.getdomaininfo, sizeof(*info));

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] pin ctxt in xc_domain_getfullinfo, Kip Macy <=