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

[Xen-changelog] [xen-unstable] ACM: Test sharing as part of the authoriz

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ACM: Test sharing as part of the authorization check.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Nov 2007 12:00:35 -0800
Delivery-date: Thu, 22 Nov 2007 12:02:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195571609 0
# Node ID 2022cbc842af902007b5379acac2ea9fc83aa061
# Parent  bc6aaa44e296c0d905daf57ebe268b32faa58376
ACM: Test sharing as part of the authorization check.

Protected the policy from being changed while the hooks are being
called.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 xen/include/xsm/acm/acm_hooks.h |    2 +-
 xen/xsm/acm/acm_policy.c        |    5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff -r bc6aaa44e296 -r 2022cbc842af xen/include/xsm/acm/acm_hooks.h
--- a/xen/include/xsm/acm/acm_hooks.h   Tue Nov 20 15:05:36 2007 +0000
+++ b/xen/include/xsm/acm/acm_hooks.h   Tue Nov 20 15:13:29 2007 +0000
@@ -325,7 +325,7 @@ static inline int acm_authorization(ssid
              acm_secondary_ops->authorization(ssidref1, ssidref2)) {
         return ACM_ACCESS_DENIED;
     } else
-        return ACM_ACCESS_PERMITTED;
+        return acm_sharing(ssidref1, ssidref2);
 }
 
 
diff -r bc6aaa44e296 -r 2022cbc842af xen/xsm/acm/acm_policy.c
--- a/xen/xsm/acm/acm_policy.c  Tue Nov 20 15:05:36 2007 +0000
+++ b/xen/xsm/acm/acm_policy.c  Tue Nov 20 15:13:29 2007 +0000
@@ -430,6 +430,9 @@ acm_get_decision(ssidref_t ssidref1, ssi
 acm_get_decision(ssidref_t ssidref1, ssidref_t ssidref2, u32 hook)
 {
     int ret = ACM_ACCESS_DENIED;
+
+    read_lock(&acm_bin_pol_rwlock);
+
     switch ( hook )
     {
 
@@ -446,6 +449,8 @@ acm_get_decision(ssidref_t ssidref1, ssi
         /* deny */
         break;
     }
+
+    read_unlock(&acm_bin_pol_rwlock);
 
     printkd("%s: ssid1=%x, ssid2=%x, decision=%s.\n",
             __func__, ssidref1, ssidref2,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ACM: Test sharing as part of the authorization check., Xen patchbot-unstable <=