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 17/24] [xen-unstable.hg] specifically whitelist VIRQ_

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 17/24] [xen-unstable.hg] specifically whitelist VIRQ_DOM_EXC as a virq that may be redirected to a domU via new hypercall
From: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Date: Mon, 23 Mar 2009 15:21:21 +0000
Delivery-date: Mon, 23 Mar 2009 08:37:06 -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
User-agent: Thunderbird 2.0.0.19 (X11/20090105)


Whitelists VIRQ_DOM_EXC for handling, permissions exception.

I sent these to Keir in an earlier state. See the explanation with
xen_virq_handler_api.

Signed-off-by: Diego Ongaro <diego.ongaro@xxxxxxxxxx>
Signed-off-by: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
---

diff -r a8d818fa0ec9 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Wed Mar 18 15:50:31 2009 +0000
+++ b/xen/arch/ia64/xen/xensetup.c      Wed Mar 18 15:56:13 2009 +0000
@@ -29,6 +29,7 @@
 #include <asm/iosapic.h>
 #include <xen/softirq.h>
 #include <xen/rcupdate.h>
+#include <xen/event.h>
 #include <xsm/acm/acm_hooks.h>
 #include <asm/sn/simulator.h>
 #include <asm/sal.h>
@@ -665,6 +666,8 @@
     dom0->is_privileged = 1;
     dom0->target = NULL;
 
+    set_global_virq_handler(dom0, VIRQ_DOM_EXC);
+
     /*
      * We're going to setup domain0 using the module(s) that we stashed safely
      * above our heap. The second module, if present, is an initrd ramdisk.
diff -r a8d818fa0ec9 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Wed Mar 18 15:50:31 2009 +0000
+++ b/xen/arch/x86/setup.c      Wed Mar 18 15:56:13 2009 +0000
@@ -20,6 +20,7 @@
 #include <xen/rcupdate.h>
 #include <xen/vga.h>
 #include <xen/dmi.h>
+#include <xen/event.h>
 #include <public/version.h>
 #ifdef CONFIG_COMPAT
 #include <compat/platform.h>
@@ -997,6 +998,8 @@
     dom0->is_privileged = 1;
     dom0->target = NULL;
 
+    set_global_virq_handler(dom0, VIRQ_DOM_EXC);
+
     /* Grab the DOM0 command line. */
     cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
     if ( (cmdline != NULL) || (kextra != NULL) )
diff -r a8d818fa0ec9 xen/common/domctl.c
--- a/xen/common/domctl.c       Wed Mar 18 15:50:31 2009 +0000
+++ b/xen/common/domctl.c       Wed Mar 18 15:56:13 2009 +0000
@@ -193,11 +193,13 @@
     long ret = 0;
     struct xen_domctl curop, *op = &curop;
 
-    if ( !IS_PRIV(current->domain) )
-        return -EPERM;
-
     if ( copy_from_guest(op, u_domctl, 1) )
         return -EFAULT;
+
+    if ( !IS_PRIV(current->domain) &&
+         !(op->cmd == XEN_DOMCTL_getdomaininfo &&
+           is_global_virq_handler(current->domain, VIRQ_DOM_EXC)) )
+        return -EPERM;
 
     if ( op->interface_version != XEN_DOMCTL_INTERFACE_VERSION )
         return -EACCES;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 17/24] [xen-unstable.hg] specifically whitelist VIRQ_DOM_EXC as a virq that may be redirected to a domU via new hypercall, Alex Zeffertt <=