freebsd-dev/usr.bin/procstat
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
..
Makefile Bring DPADD in sync with LDADD. 2012-05-19 05:07:03 +00:00
procstat_args.c Use libprocstat(3) to retrieve process command line arguments and 2013-04-20 08:08:29 +00:00
procstat_auxv.c Use libprocstat(3) to retrieve ELF auxiliary vector. 2013-04-20 08:15:43 +00:00
procstat_basic.c
procstat_bin.c Use libprocstat(3) when retrieving binary information for a process. 2013-04-20 08:05:04 +00:00
procstat_cred.c Use procstat_getumask(3) for retrieving umaks information instead of 2013-04-20 07:58:20 +00:00
procstat_files.c Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
procstat_kstack.c Use procstat_getkstack(3) for retrieving process kernel stacks 2013-04-20 08:19:06 +00:00
procstat_rlimit.c Add a resource limit for the total number of kqueues available to the 2013-10-21 16:46:12 +00:00
procstat_sigs.c Use procstat_getprocs(3) for retrieving thread information instead of 2013-04-20 07:50:59 +00:00
procstat_threads.c Use procstat_getprocs(3) for retrieving thread information instead of 2013-04-20 07:50:59 +00:00
procstat_vm.c Use more generic procstat_getvmmap(3) for retrieving VM layout of a process. 2013-04-20 07:52:23 +00:00
procstat.1 cap_new(2) and cap_getrights2) were replaced with cap_rights_limit(2) 2013-09-19 10:56:36 +00:00
procstat.c Make use of newly added libprocstat(3) ability to extract procstat 2013-04-20 08:22:09 +00:00
procstat.h Use procstat_getkstack(3) for retrieving process kernel stacks 2013-04-20 08:19:06 +00:00