read/write operations, so mask out PROT_EXEC to avoid creating an pointless
exec mapping in the kernel.
We probably need this masking upon minprot (for the non-UVM_EXTRACT_FIXPROT
case) also, but I haven't done a test yet.
ok kettenis
-/* $OpenBSD: uvm_map.c,v 1.305 2022/12/18 23:41:17 deraadt Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.306 2023/01/24 00:14:30 deraadt Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
}
kernel_map->size += cp_len;
if (flags & UVM_EXTRACT_FIXPROT)
- newentry->protection = newentry->max_protection;
+ newentry->protection = newentry->max_protection &
+ ~PROT_MAX;
/*
* Step 2: perform pmap copy.