summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneal <neal>2008-05-28 14:36:32 +0000
committerneal <neal>2008-05-28 14:36:32 +0000
commit9865ab6c164f9bb6f4ab056d33ea2441b6d7689c (patch)
treee25735d860aee28a49946e68d2a40bc6a5d60e8f
parent2c808492ceb8a2f86c4e6fd22bd6161209914650 (diff)
2008-05-28 Neal H. Walfield <neal@gnu.org>
* cap-lookup.c (lookup): If a cappage is read-only, only bail if TYPE is not weak.
-rw-r--r--viengoos/ChangeLog5
-rw-r--r--viengoos/cap-lookup.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog
index 872c6a7..023cb06 100644
--- a/viengoos/ChangeLog
+++ b/viengoos/ChangeLog
@@ -1,5 +1,10 @@
2008-05-28 Neal H. Walfield <neal@gnu.org>
+ * cap-lookup.c (lookup): If a cappage is read-only, only bail if
+ TYPE is not weak.
+
+2008-05-28 Neal H. Walfield <neal@gnu.org>
+
* viengoos.c (ager_start): Increase the stack size.
2008-05-28 Neal H. Walfield <neal@gnu.org>
diff --git a/viengoos/cap-lookup.c b/viengoos/cap-lookup.c
index 9b84a8a..719103c 100644
--- a/viengoos/cap-lookup.c
+++ b/viengoos/cap-lookup.c
@@ -101,7 +101,7 @@ lookup (activity_t activity,
/* The page directory is read-only. Note the weakened access
appropriately. */
{
- if (type != -1 && type != cap_rpage && type != cap_rcappage)
+ if (type != -1 && ! cap_type_weak_p (type))
{
debug (1, "Read-only cappage at %llx/%d but %s requires "
"write access",
@@ -110,10 +110,7 @@ lookup (activity_t activity,
cap_type_string (type));
/* Translating this capability does not provide write
- access. The only objects that are useful without write
- access are read-only pages and read-only capability
- pages. If the user is not looking for one of those,
- then bail. */
+ access. The requested type is strong, bail. */
return false;
}
@@ -278,8 +275,7 @@ lookup (activity_t activity,
}
}
- if (mode == want_object
- && (root->type == cap_rpage || root->type == cap_rcappage))
+ if (mode == want_object && cap_type_weak_p (root->type))
w = false;
if (writable)