Searched hist:"19 f49ad30f5ef296867e3675378e2ca010adfa1d" (Results 1 – 1 of 1) sorted by relevance
/freebsd/sys/vm/ |
H A D | vm_map.c | diff 19f49ad30f5ef296867e3675378e2ca010adfa1d Sun Jun 25 22:06:05 CEST 2017 Konstantin Belousov <kib@FreeBSD.org> Correctly handle small MAP_STACK requests.
If mmap(2) is called with the MAP_STACK flag and the size which is less or equal to the initial stack mapping size plus guard, calculation of the mapping layout created zero-sized guard. Attempt to create such entry failed in vm_map_insert(), causing the whole mmap(2) call to fail.
Fix it by adjusting the initial mapping size to have space for non-empty guard. Reject MAP_STACK requests which are shorter or equal to the configured guard pages size.
Reported and tested by: Manfred Antar <null@pozo.com> Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week
|