aboutsummaryrefslogtreecommitdiffstats
path: root/xen/xsm
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-05-07 16:49:53 +0200
committerJan Beulich <jbeulich@suse.com>2013-05-07 16:49:53 +0200
commit0b201e6f584df8c3766240c6c4a8c04d2f37043e (patch)
tree4f0a67620bb1e1e98c720c0b04b84ae9e3f53604 /xen/xsm
parent919f59b3b99e1d845c6a1f30125e79e828805d87 (diff)
downloadxen-0b201e6f584df8c3766240c6c4a8c04d2f37043e.tar.gz
xen-0b201e6f584df8c3766240c6c4a8c04d2f37043e.tar.bz2
xen-0b201e6f584df8c3766240c6c4a8c04d2f37043e.zip
arm: remove rcu_lock_target_domain_by_id users
This function has been replaced with rcu_lock_domain_by_any_id and an XSM check. Two callers already had an XSM check; add a check to the third. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (for 4.3 release) Acked-by: Ian Campbell <ian.campbell@citrix.com> (for thae ARM bits)
Diffstat (limited to 'xen/xsm')
-rw-r--r--xen/xsm/dummy.c3
-rw-r--r--xen/xsm/flask/hooks.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 3d84e73110..937761f095 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -132,4 +132,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
set_to_dummy_if_null(ops, ioport_permission);
set_to_dummy_if_null(ops, ioport_mapping);
#endif
+#ifdef CONFIG_ARM
+ set_to_dummy_if_null(ops, map_gmfn_foreign);
+#endif
}
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 3291aa2e6c..bb10de3ae8 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1454,6 +1454,13 @@ static int flask_unbind_pt_irq (struct domain *d, struct xen_domctl_bind_pt_irq
{
return current_has_perm(d, SECCLASS_RESOURCE, RESOURCE__REMOVE);
}
+#endif /* CONFIG_X86 */
+
+#ifdef CONFIG_ARM
+static int flask_map_gmfn_foreign(struct domain *d, struct domain *t)
+{
+ return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
+}
#endif
long do_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
@@ -1562,6 +1569,9 @@ static struct xsm_operations flask_ops = {
.ioport_permission = flask_ioport_permission,
.ioport_mapping = flask_ioport_mapping,
#endif
+#ifdef CONFIG_ARM
+ .map_gmfn_foreign = flask_map_gmfn_foreign,
+#endif
};
static __init int flask_init(void)