freebsd-dev/sys
Konstantin Belousov 19f49ad30f 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
2017-06-25 20:06:05 +00:00
..
amd64 Translate between abridged and full x87 tags for compat32 2017-06-24 11:38:31 +00:00
arm Remove ALLWINNER kernel config file, all release image for SMP Allwinner 2017-06-25 11:31:39 +00:00
arm64 Stop calling cpu_dcache_wb_range from PTE_SYNC. 2017-06-25 13:22:49 +00:00
boot loader.efi: Disable smbios for arm 2017-06-24 09:33:25 +00:00
bsm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
cam Fix a potential sleep while holding a mutex in the sa(4) driver. 2017-06-19 20:48:00 +00:00
cddl fix gcc-specific fallout from r320156, MFV of r318946, ZFS ABD 2017-06-23 08:42:53 +00:00
compat Add u64_to_user_ptr() to the LinuxKPI. 2017-06-25 19:30:20 +00:00
conf Allwinner: Add support for H2 Plus SoC 2017-06-24 16:41:26 +00:00
contrib Avoid including list.h in LinuxKPI headers. 2017-06-18 16:43:57 +00:00
crypto Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
ddb Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
dev jedec_ts: add support for devices manufactured by IDT 2017-06-23 11:55:43 +00:00
fs PFS_DELEN is the sum of the permanent part of the struct dirent and 2017-06-25 15:21:51 +00:00
gdb
geom Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
gnu Update the GNU DTS file from Linux 4.11 2017-06-20 03:13:49 +00:00
i386 Fix indent. 2017-06-24 10:19:06 +00:00
isa
kern Provide sbsetopt() that handles socket buffer related socket options. 2017-06-25 01:41:07 +00:00
kgssapi
libkern arm64: add ".arch armv8-a+crc" to allow use of crc instructions 2017-06-08 20:06:09 +00:00
mips [ar71xx] migrate all of the duplicate configuration out into a shared config file. 2017-06-16 00:44:23 +00:00
modules Allwinner: Add support for H2 Plus SoC 2017-06-24 16:41:26 +00:00
net Revert r319989 "bnxt(4) Enable LRO support" 2017-06-17 17:42:52 +00:00
net80211 net80211: initialize i_seq for A-MPDU frames. 2017-06-01 20:46:43 +00:00
netgraph Check return value from soaccept(). 2017-06-14 16:13:20 +00:00
netinet Handle sctp_get_next_param() in a consistent way. 2017-06-23 21:01:57 +00:00
netinet6 Fix an unnecessary/incorrect check in the PKTOPT_EXTHDRCPY macro. 2017-05-30 14:50:28 +00:00
netipsec Build kdebug_secreplay() function only when IPSEC_DEBUG is defined. 2017-06-01 10:04:12 +00:00
netpfil Fix the queue delay estimation in PIE/FQ-PIE when the timestamp 2017-05-19 08:38:03 +00:00
netsmb
nfs
nfsclient Add an NFSv4.1 mount option for "use one openowner". 2017-04-13 21:54:19 +00:00
nfsserver
nlm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ofed Avoid including list.h in LinuxKPI headers. 2017-06-18 16:43:57 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Actually add the mpc85xx_get_platform_clock() function. 2017-06-14 04:26:37 +00:00
riscv Undefine temporary macro. 2017-06-17 07:36:46 +00:00
rpc Listening sockets improvements. 2017-06-08 21:30:34 +00:00
security Correct bitwise test in mac_bsdextended ugidfw_rule_valid() 2017-06-13 01:17:58 +00:00
sparc64 Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
sys Provide sbsetopt() that handles socket buffer related socket options. 2017-06-25 01:41:07 +00:00
teken
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools make.conf: Add the possibility to use another DTC 2017-06-17 23:34:53 +00:00
ufs Mitigate several problems with the softdep_request_cleanup() on busy 2017-06-03 16:18:50 +00:00
vm Correctly handle small MAP_STACK requests. 2017-06-25 20:06:05 +00:00
x86 Fix batched unload for DMAR busdma in qi mode. 2017-06-19 21:48:52 +00:00
xdr * limit size of buffers to RPC_MAXDATASIZE 2017-06-01 06:12:25 +00:00
xen
Makefile Remove glimpse make target added in r181432 2017-05-22 15:53:30 +00:00