libc/newlib/libc/sys/rtems
kib eb82d7086c Implement address space guards.
Guard, requested by the MAP_GUARD mmap(2) flag, prevents the reuse of
the allocated address space, but does not allow instantiation of the
pages in the range.  It is useful for more explicit support for usual
two-stage reserve then commit allocators, since it prevents accidental
instantiation of the mapping, e.g. by mprotect(2).

Use guards to reimplement stack grow code.  Explicitely track stack
grow area with the guard, including the stack guard page.  On stack
grow, trivial shift of the guard map entry and stack map entry limits
makes the stack expansion.  Move the code to detect stack grow and
call vm_map_growstack(), from vm_fault() into vm_map_lookup().

As result, it is impossible to get random mapping to occur in the
stack grow area, or to overlap the stack guard page.

Enable stack guard page by default.

Reviewed by:	alc, markj
Man page update reviewed by:	alc, bjk, emaste, markj, pho
Tested by:	pho, Qualys
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D11306 (man pages)
2018-08-24 15:00:02 +02:00
..
include Implement address space guards. 2018-08-24 15:00:02 +02:00
Makefile.am Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
Makefile.in Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
aclocal.m4 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
configure Add nvptx port. 2018-04-13 15:42:37 -04:00
configure.in 2006-04-13 Ralf Corsepius <ralf.corsepius@rtems.org> 2006-04-13 19:56:32 +00:00
cpusetalloc.c 2013-11-27 Sebastian Huber <sebastian.huber@embedded-brains.de> 2013-11-27 14:53:59 +00:00
cpusetfree.c 2013-11-27 Sebastian Huber <sebastian.huber@embedded-brains.de> 2013-11-27 14:53:59 +00:00
crt0.c RTEMS: Add __tls_get_addr() to crt0 2018-08-20 13:54:22 +02:00
dummysys.c import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00