freebsd-dev/lib/libc
Konstantin Belousov 85a0ddfd0b Add a resource limit for the total number of kqueues available to the
user.  Kqueue now saves the ucred of the allocating thread, to
correctly decrement the counter on close.

Under some specific and not real-world use scenario for kqueue, it is
possible for the kqueues to consume memory proportional to the square
of the number of the filedescriptors available to the process.  Limit
allows administrator to prevent the abuse.

This is kernel-mode side of the change, with the user-mode enabling
commit following.

Reported and tested by:	pho
Discussed with:	jmg
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-10-21 16:46:12 +00:00
..
amd64 libc: Access _logname_valid more efficiently. 2013-08-17 19:24:58 +00:00
arm On ARM EABI double precision floating point values are stored in the 2013-09-07 14:04:10 +00:00
capability Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
compat-43 Update the kill(2) and killpg(2) man pages to the modern permission 2012-10-22 03:37:00 +00:00
db db: Use O_CLOEXEC instead of separate fcntl() call. 2013-08-13 19:20:50 +00:00
gdtoa Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
gen syslog: Use SOCK_CLOEXEC instead of separate fcntl() call. 2013-10-20 21:04:44 +00:00
gmon libc: Use O_CLOEXEC when writing gmon files (cc -pg). 2013-08-13 21:45:48 +00:00
i386 libc: Access _logname_valid more efficiently. 2013-08-17 19:24:58 +00:00
ia64 The getcontext() from the __fillcontextx() call in the 2013-05-28 04:54:16 +00:00
iconv Drop cm_lock before calling mapper_close, which in turn could call 2013-10-21 07:58:37 +00:00
include Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
inet A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
isc A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
locale Replace the #define for "iconv" so it is for the function name instead of 2013-07-03 07:03:19 +00:00
mips Remove clause 3 and 4 from TNF licenses 2013-05-29 01:54:10 +00:00
nameser A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
net Remove an unused variable and fix a memory leak in sctp_connectx(). 2013-09-19 06:19:24 +00:00
nls POSIX 1003.1-2008: add ENOTRECOVERABLE, EOWNERDEAD errnos. 2013-05-04 19:07:22 +00:00
posix1e libc: Make various internal file descriptors from fopen() close-on-exec. 2013-08-23 13:59:47 +00:00
powerpc Revert r253748,253749 2013-07-28 18:44:17 +00:00
powerpc64 Revert r253748,253749 2013-07-28 18:44:17 +00:00
quad For ARM EABI we only need a subset of the quad functions, the rest are 2013-01-19 02:33:57 +00:00
regex Fix assignment of maximum bounadary. 2013-03-01 23:26:13 +00:00
resolv libc: Make resolver sockets close-on-exec (SOCK_CLOEXEC). 2013-09-06 23:49:54 +00:00
rpc Assign the len field of the netbuf structure to the current length of 2013-03-01 15:45:57 +00:00
softfloat Conditionalize the __floatunsisf and __floatunsidf functions, added in 2012-01-20 14:44:21 +00:00
sparc64 Prefix the alias macros for members of struct __mcontext with an underscore 2013-07-12 14:24:52 +00:00
stdio libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a). 2013-09-06 13:47:16 +00:00
stdlib system(): Restore behaviour for SIGINT and SIGQUIT. 2013-09-01 19:59:54 +00:00
stdtime Compile contrib/tzcode/stdtime/localtime.c with -fwrapv, since it relies 2013-03-24 01:35:37 +00:00
string libc: Always use our own copy of sys_errlist and sys_nerr (.so only). 2013-08-31 22:32:42 +00:00
sys Add a resource limit for the total number of kqueues available to the 2013-10-21 16:46:12 +00:00
uuid Note that memory should be freed after uuid_to_string(3) call. 2012-03-01 14:39:01 +00:00
xdr Add a HISTORY section 2011-07-10 06:57:00 +00:00
yp libc: Use O_CLOEXEC for various internal file descriptors. 2012-09-29 11:54:34 +00:00
libc.ldscript Turn libc.so into an ld script rather than a symlink pointing to the 2013-06-12 21:12:05 +00:00
Makefile Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
Versions.def Add a FBSD_1.3 namespace for FreeBSD 10. 2011-10-10 15:42:33 +00:00