libc/newlib/libc/sys/rtems/include/sys
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
..
_bitset.h FreeBSD compatibility for RTEMS <sys/cpuset.h> 2017-05-25 12:36:27 -04:00
_cpuset.h FreeBSD compatibility for RTEMS <sys/cpuset.h> 2017-05-25 12:36:27 -04:00
_iovec.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
_pthreadtypes.h RTEMS: Fix _PTHREAD_MUTEX_INITIALIZER 2017-10-13 08:07:13 +02:00
_sockaddr_storage.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
_termios.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
bitset.h Synchronize RTEMS <sys/bitset.h> with FreeBSD 2017-07-12 08:04:45 +02:00
cpuset.h Fix some RTEMS CPUSET(9) macros 2017-06-07 15:46:19 +02:00
dirent.h rtems/.../dirent.h: Add alphasort() prototype 2018-03-13 09:11:47 -05:00
filio.h Add de-facto standard <sys/ioctl.h> for RTEMS 2017-05-25 12:42:08 -04:00
ioccom.h Fix RTEMS ioctl() declaration 2017-06-07 15:46:20 +02:00
ioctl.h Add de-facto standard <sys/ioctl.h> for RTEMS 2017-05-25 12:42:08 -04:00
lock.h RTEMS: Add semaphore <sys/lock.h> functions 2017-11-30 07:00:45 +01:00
mman.h Implement address space guards. 2018-08-24 15:00:02 +02:00
param.h Increase MSIZE for RTEMS 2017-05-25 12:33:59 -04:00
socket.h Listening sockets improvements. 2018-08-24 15:00:02 +02:00
sockio.h Add de-facto standard <sys/ioctl.h> for RTEMS 2017-05-25 12:42:08 -04:00
syslimits.h Move header files 2015-07-29 12:53:53 -07:00
syslog.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
ttycom.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
ttydefaults.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
uio.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
un.h Add some POSIX header files for RTEMS 2017-05-25 12:41:33 -04:00
utime.h Move header files 2015-07-29 12:53:53 -07:00