From 987b847efc496b1c9eca46c908bdfe613f0557b3 Mon Sep 17 00:00:00 2001 From: Jonathan Lemon Date: Fri, 12 Sep 1997 15:58:47 +0000 Subject: [PATCH] Do not consider VM_PROT_OVERRIDE_WRITE to be part of the protection entry when handling a fault. This is set by procfs whenever it wants to write to a page, as a means of overriding `r-x COW' entries, but causes failures in the `rwx' case. Submitted by: bde --- sys/vm/vm_map.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index d2e9f4b8b73..1b7e1acaa77 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.88 1997/08/25 22:15:22 bde Exp $ + * $Id: vm_map.c,v 1.89 1997/09/01 03:17:18 bde Exp $ */ /* @@ -2287,7 +2287,8 @@ RetryLookup:; if ((fault_type & VM_PROT_OVERRIDE_WRITE) == 0 || (entry->eflags & MAP_ENTRY_COW) == 0 || (entry->wired_count != 0)) { - if ((fault_type & (prot)) != fault_type) + if ((fault_type & (prot)) != + (fault_type & ~VM_PROT_OVERRIDE_WRITE)) RETURN(KERN_PROTECTION_FAILURE); }