]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add MAP_GUARD and use it for stack grow area protection.
authorkib <kib@FreeBSD.org>
Fri, 7 Jul 2017 06:29:18 +0000 (06:29 +0000)
committerkib <kib@FreeBSD.org>
Fri, 7 Jul 2017 06:29:18 +0000 (06:29 +0000)
commit68b89c96a435a2d436fda459b2c9a4e6571c9929
tree15ef59894f6a0b0c03212d7fb77b61f6455c2707
parent8df37be70f94a016be894dad5569593b1c6757a4
Add MAP_GUARD and use it for stack grow area protection.
Bump __FreeBSD_version.  This is an MFS of stable/11 r320666.

MFC r320317:
Implement address space guards.

MFC r320338:
Remove stale part of the comment.

MFC r320339:
Correctly handle small MAP_STACK requests.

MFC r320344:
For now, allow mprotect(2) over the guards to succeed regardless of
the requested protection.

MFC r320430:
Treat the addr argument for mmap(2) request without MAP_FIXED flag as
a hint.

MFC r320560 (by alc):
Modify vm_map_growstack() to protect itself from the possibility of the
gap entry in the vm map being smaller than the sysctl-derived stack guard
size.

Approved by: re (delphij)
lib/libc/sys/mmap.2
lib/libc/sys/munmap.2
sys/sys/mman.h
sys/sys/param.h
sys/vm/vm.h
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_mmap.c