subset of the request permissions, so when forcing an initial RO
fault for CoW also clamp the access_type.
problem reported by bluhm@
based on a suggestion from miod@
ok kettenis@
-/* $OpenBSD: uvm_fault.c,v 1.125 2022/02/01 08:38:53 guenther Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.126 2022/02/03 19:57:11 guenther Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
* uvm does it by inserting the new mapping RO and
* letting it fault again.
*/
- if (P_HASSIBLING(curproc))
+ if (P_HASSIBLING(curproc)) {
flt->enter_prot &= ~PROT_WRITE;
+ flt->access_type &= ~PROT_WRITE;
+ }
#endif
/*