[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] fix DOMID_IO mapping permission checks (try 2)

commit 07344c0f33be13bf9232a113681ef9087557f706
Author:     Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
AuthorDate: Thu Sep 26 10:15:47 2013 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Sep 26 10:15:47 2013 +0200

    fix DOMID_IO mapping permission checks (try 2)
    When the permission checks for memory mapping were moved from
    get_pg_owner to xsm_mmu_update in aaba7a677, the exception for DOMID_IO
    was not taken into account. This will cause IO memory mappings by PV
    domains (mini-os in particular) to fail when XSM/FLASK is not being
    used. This patch reintroduces the exception for DOMID_IO; the actual
    restrictions on IO memory mappings have always been checked separately
    using iomem_access_permitted, so this change should not break existing
    access control.
    Reported-by: Eduardo Peixoto Macedo <epm@xxxxxxxxxxx>
    Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
 xen/include/xsm/dummy.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index cc0a5a8..052f3e0 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -567,9 +567,10 @@ static XSM_INLINE int 
xsm_domain_memory_map(XSM_DEFAULT_ARG struct domain *d)
 static XSM_INLINE int xsm_mmu_update(XSM_DEFAULT_ARG struct domain *d, struct 
domain *t,
                                      struct domain *f, uint32_t flags)
-    int rc;
+    int rc = 0;
-    rc = xsm_default_action(action, d, f);
+    if ( f != dom_io )
+        rc = xsm_default_action(action, d, f);
     if ( t && !rc )
         rc = xsm_default_action(action, d, t);
     return rc;
generated by git-patchbot for /home/xen/git/xen.git#master

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.