freebsd-dev/sys
Konstantin Belousov 4b48959f9f Enforce the maxproc limitation before allocating struct proc, initial
struct thread and kernel stack for the thread.  Otherwise, a load
similar to a fork bomb would exhaust KVA and possibly kmem, mostly due
to the struct proc being type-stable.

The nprocs counter is changed from being protected by allproc_lock sx
to be an atomic variable.  Note that ddb/db_ps.c:db_ps() use of nprocs
was unsafe before, and is still unsafe, but it seems that the only
possible undesired consequence is the harmless warning printed when
allproc linked list length does not match nprocs.

Diagnosed by:	Svatopluk Kraus <onwahe@gmail.com>
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-10-08 11:07:09 +00:00
..
amd64 Update Xen headers from 4.2 to 4.6 2015-10-06 11:29:44 +00:00
arm Move pmu.c to files.arm and rename the option to pmu. This is not hwpmc 2015-10-07 13:19:44 +00:00
arm64 When trying to execute from a misaligned address raise a SIGBUS with the 2015-10-04 21:16:45 +00:00
boot Use EFI page size constants instead of hardcoding 4096. 2015-09-29 15:49:53 +00:00
bsm
cam Add missing vnode lock in case of file modify request. 2015-10-08 07:34:30 +00:00
cddl Restore original array_rd_sz semantics. 2015-10-03 11:05:58 +00:00
compat Properly format pointer size independent CloudABI system calls. 2015-10-08 05:27:45 +00:00
conf Move pmu.c to files.arm and rename the option to pmu. This is not hwpmc 2015-10-07 13:19:44 +00:00
contrib On some interfaces, ipfilter drops UDP packets with zero checkum. 2015-10-06 03:41:11 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Make kstack_pages a tunable on arm, x86, and powepc. On i386, the 2015-08-10 17:18:21 +00:00
dev wpi(4): check size before transmitting frames 2015-10-08 07:22:40 +00:00
fs Ensure that when a blockable open of fifo returns success, a valid 2015-09-20 21:18:33 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom geom_dev: Use kenv 'dumpdev' in the same way as rc/etc.d/dumpon 2015-09-23 21:08:52 +00:00
gnu Fixing a memory leak on module unloading. 2015-09-11 22:43:35 +00:00
i386 Update Xen headers from 4.2 to 4.6 2015-10-06 11:29:44 +00:00
isa
kern Enforce the maxproc limitation before allocating struct proc, initial 2015-10-08 11:07:09 +00:00
kgssapi
libkern Add the __aeabi_memclr8 symbol, clang 3.7 uses this. 2015-09-21 18:35:32 +00:00
mips Set correct argemdio addr, comment out arge1 as its not physically 2015-10-04 22:50:37 +00:00
modules Fix make depend in sys/modules/otus 2015-10-01 05:56:38 +00:00
net Fix a bug that caused reinitialization failure of MAC addresses on 2015-10-07 06:32:34 +00:00
net80211 net80211: reduce code duplication in the ieee80211_ioctl_setwmeparam() + fix comments. 2015-10-03 22:38:08 +00:00
netgraph Add support for PPP-Max-Payload PPPoE tag (RFC4638). 2015-09-11 09:15:27 +00:00
netinet Fix regression from r287779, that bite me. If we call m_pullup() 2015-10-07 13:10:26 +00:00
netinet6 Invoke lle_event for new entry iff it has lladdr set. 2015-10-04 19:10:27 +00:00
netipsec Take extra reference to security policy before calling crypto_dispatch(). 2015-09-30 08:16:33 +00:00
netnatm
netpfil Bump number of prefixes in O_IP_<SRC|DST> from 15 to 31 (max possible). 2015-10-03 05:42:25 +00:00
netsmb
nfs Wait up to 10 seconds for late-initializing network interfaces to arrive. 2015-09-26 13:55:55 +00:00
nfsclient
nfsserver
nlm
ofed Fix build broken by r287861. 2015-09-16 15:40:08 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Add missing ofw_machdep.h. Make x86 ofw_machdep.h work pc98 too. 2015-08-28 15:41:09 +00:00
powerpc Save the link register in savectx(). 2015-10-06 01:24:46 +00:00
rpc Increase group limit for kerberized NFSv4 2015-09-26 16:30:16 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Add support for weak symbols to the kernel linkers. It means that 2015-09-20 01:27:59 +00:00
sys Fix r283120 which use class size larger than 8bits. 2015-10-08 10:00:41 +00:00
teken Sync HPA and VPA implementations with CUP. 2015-08-24 07:49:27 +00:00
tools save some bytes by using more concise SDT_PROBE<n> instead of SDT_PROBE 2015-09-28 12:14:16 +00:00
ufs In softdep_setup_freeblocks(): 2015-10-07 12:36:28 +00:00
vm Exploit r288122 to address a cosmetic issue. Pages belonging to either 2015-10-06 05:49:00 +00:00
x86 dmar_ctx_dtr() does not exist since r284869. Remove the static function 2015-09-22 16:50:59 +00:00
xdr
xen Update Xen headers from 4.2 to 4.6 2015-10-06 11:29:44 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00