Add vm_map_insert1(9) The function returns the newly created entry. Use vm_map_insert1() in stack grow code to avoid gap entry re-lookup. Suggested by: alc
vm_map_growstack(): handle max protection for stacks Do not assume that protection is same as max_protection. Store both in offset, packed in the same way as the prot syscall parameter.
vm_map_protect(): handle stack protection stored in the stack guard mprotect(2) on the stack region needs to adjust guard stored protection, so that e.g. enable executing on stack worked properly on stack growth. Reported by: dchagin
vm_map: do not allow to merge stack gap entries At least, offset handling is wrong for them.
vm_map_growstack(): restore stack gap data if gap entry was removed and then restored.
vm_map_protect(): propagate lowest stack segment protection to the grow gap This seems to be required for Linux emulation.
vm_map_protect(): add VM_MAP_PROTECT_GROWSDOWN flag which requests to propagate lowest stack segment protection to the grow gap. This seems to be required for Linux emulation. Reported by: dchagin
linuxolator: implement Linux' PROT_GROWSDOWN From the Linux man page for mprotect(2): PROT_GROWSDOWN Apply the protection mode down to the beginning of a mapping that grows downward (which should be a stack segment or a segment mapped with the MAP_GROWSDOWN flag set). Reported by: dchagin