* [PATCH] xsm/flask: Use correct flag to detect writable grant mappings
@ 2011-11-18 18:18 Daniel De Graaf
0 siblings, 0 replies; only message in thread
From: Daniel De Graaf @ 2011-11-18 18:18 UTC (permalink / raw)
To: Xen-devel; +Cc: Daniel De Graaf
The flags passed to xsm_grant_mapref are the flags from the map
operation (GNTMAP_*), not status flags (GTF_*).
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
xen/xsm/flask/hooks.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index e70feda..1cfa621 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -279,7 +279,7 @@ static int flask_grant_mapref(struct domain *d1, struct domain *d2,
{
u32 perms = GRANT__MAP_READ;
- if ( flags & GTF_writing )
+ if (!( flags & GNTMAP_readonly))
perms |= GRANT__MAP_WRITE;
return domain_has_perm(d1, d2, SECCLASS_GRANT, perms);
--
1.7.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-18 18:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18 18:18 [PATCH] xsm/flask: Use correct flag to detect writable grant mappings Daniel De Graaf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).