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] xsm: return unlabeled instead of failing

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xsm: return unlabeled instead of failing with ENOENT in get_page_sid
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 09 Oct 2010 14:56:06 -0700
Delivery-date: Sat, 09 Oct 2010 15:04:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1285176361 -3600
# Node ID 20f1390104457a6e6f0a2b879329bfb4b3a3a160
# Parent  db340d6e9b06c3b98d6d42a177f6ad2199bd1fd0
xsm: return unlabeled instead of failing with ENOENT in get_page_sid

It is better to return an unlabeled SID in the case where dsec is NULL
instead of bailing out with an error.

From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
---
 xen/xsm/flask/hooks.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

diff -r db340d6e9b06 -r 20f139010445 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Wed Sep 22 18:04:11 2010 +0100
+++ b/xen/xsm/flask/hooks.c     Wed Sep 22 18:26:01 2010 +0100
@@ -340,10 +340,7 @@ static int get_page_sid(struct page_info
         default:
             /*Pages are implicitly labeled by domain ownership!*/
             dsec = d->ssid;
-            if (dsec)
-                *sid = dsec->sid;
-            else
-                rc = -ENOENT;
+            *sid = dsec ? dsec->sid : SECINITSID_UNLABELED;
         break;
     }
 

_______________________________________________
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] xsm: return unlabeled instead of failing with ENOENT in get_page_sid, Xen patchbot-unstable <=