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
This commit is contained in:
Jonathan Lemon 1997-09-12 15:58:47 +00:00
parent f9fc03961c
commit 987b847efc

View file

@ -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);
}