I've looked at it some more and it looks like it would be a real mess to do it in the protection code. I think it may be best to fix it in the fault code. That is, to explicitly allow a user-wired page to be write-faulted.
The primary protection check that is causing the segv is in vm_map_lookup() line 3161 and line 3297 (FreeBSD current). Commenting those out will allow the COW on the user-wired page: if ((entry->eflags & MAP_ENTRY_USER_WIRED) && (entry->eflags & MAP_ENTRY_COW) && (fault_type & VM_PROT_WRITE) && (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) { RETURN(KERN_PROTECTION_FAILURE); } BUT! This is going to cause a panic later on. There is one big gotcha and that is the COW fault will cause the VM system to lose track of the wiring of (I think) either the original page or the COW'd page, and you will get a panic when it tries to unwire it later on. I will mess with it a bit in DragonFly to see if there's a simple solution. -Matt _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"