1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/sys
John Baldwin 91d5354a2c Locking for the per-process resource limits structure.
- struct plimit includes a mutex to protect a reference count.  The plimit
  structure is treated similarly to struct ucred in that is is always copy
  on write, so having a reference to a structure is sufficient to read from
  it without needing a further lock.
- The proc lock protects the p_limit pointer and must be held while reading
  limits from a process to keep the limit structure from changing out from
  under you while reading from it.
- Various global limits that are ints are not protected by a lock since
  int writes are atomic on all the archs we support and thus a lock
  wouldn't buy us anything.
- All accesses to individual resource limits from a process are abstracted
  behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return
  either an rlimit, or the current or max individual limit of the specified
  resource from a process.
- dosetrlimit() was renamed to kern_setrlimit() to match existing style of
  other similar syscall helper functions.
- The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit()
  (it didn't used the stackgap when it should have) but uses lim_rlimit()
  and kern_setrlimit() instead.
- The svr4 compat no longer uses the stackgap for resource limits calls,
  but uses lim_rlimit() and kern_setrlimit() instead.
- The ibcs2 compat no longer uses the stackgap for resource limits.  It
  also no longer uses the stackgap for accessing sysctl's for the
  ibcs2_sysconf() syscall but uses kernel_sysctl() instead.  As a result,
  ibcs2_sysconf() no longer needs Giant.
- The p_rlimit macro no longer exists.

Submitted by:	mtm (mostly, I only did a few cleanups and catchups)
Tested on:	i386
Compiled on:	alpha, amd64
2004-02-04 21:52:57 +00:00
..
alpha Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
amd64 Remove a device that will compile fine, isn't 64-bit clean. 2004-02-02 00:54:59 +00:00
arm
boot MFi386: revision 1.33 2004-01-28 04:15:31 +00:00
cam Fix type in comment, 's/writtent/written/' 2004-01-18 00:17:14 +00:00
coda - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
compat Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
conf Reserve 187 (twa) for the new 3ware ATA RAID controller. 2004-02-02 20:00:56 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r124528, 2004-01-14 18:54:22 +00:00
crypto Fix a reentrancy issue in md5_calc(). 2004-01-27 18:57:21 +00:00
ddb If not in the debugger or if the user requests it with the 2004-01-28 06:51:18 +00:00
dev Expand the mask for the Avlab Technology, PCI IO 2S entry to cover the 2004-02-04 18:01:02 +00:00
fs Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
geom Allow a GEOM class to unload if it has no geoms or a method function to 2004-02-02 19:49:41 +00:00
gnu Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
i4b Based on an excellent suggestion from tanimura@ define I4BPRI and use it 2003-11-10 14:20:34 +00:00
i386 Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
ia64 Sort PFIL_HOOKS. 2004-01-27 20:22:53 +00:00
isa Significantly reduce the "jitter" that is typical for PS/2 mice 2003-12-11 11:28:11 +00:00
isofs/cd9660 Spell magic '16' number as IO_SEQSHIFT. 2004-01-19 20:03:43 +00:00
kern Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
libkern Translate from GNU C to ISO C. 2004-01-14 07:47:10 +00:00
modules Always build ext2fs module. There is no written policy preventing the 2004-01-28 04:16:13 +00:00
net Add the kernel side of network interface renaming support. 2004-02-04 02:54:25 +00:00
net80211 Change WI_RID_SCAN_RES compatibility interface to return the result after 2004-01-19 05:25:43 +00:00
netatalk Eliminate a duplicate free when deleting an interface address. This 2003-11-28 04:19:41 +00:00
netatm Introduce a MAC label reference in 'struct inpcb', which caches 2003-11-18 00:39:07 +00:00
netgraph Use the official ng_timeout function to trigger sending. This means, 2004-01-30 15:34:57 +00:00
netinet pass pcb rather than so. it is expected that per socket policy 2004-02-03 18:20:55 +00:00
netinet6 KNF 2004-02-04 12:55:45 +00:00
netipsec o add missing break 2004-01-27 17:45:28 +00:00
netipx Introduce a MAC label reference in 'struct inpcb', which caches 2003-11-18 00:39:07 +00:00
netkey avoid duplicate free. 2004-01-25 17:18:12 +00:00
netnatm Introduce a MAC label reference in 'struct inpcb', which caches 2003-11-18 00:39:07 +00:00
netncp
netsmb Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
nfs University of Michigan's Citi NFSv4 kernel client code. 2003-11-14 20:54:10 +00:00
nfs4client This patch fixes two little portability (to !GCC compilers) problems: 2003-12-11 11:30:26 +00:00
nfsclient Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
nfsserver Fix some becuase -> because typos. 2003-12-17 16:12:01 +00:00
opencrypto Do not aggressively unroll the AES implementation, in non-benchmarking use 2004-02-04 08:44:10 +00:00
pc98 MFi386: revision 1.397 (cosmetic changes) 2004-01-30 13:15:42 +00:00
pccard - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
pci Fix multicast and promiscuous mode handling for Yukon devices. 2004-01-21 22:32:15 +00:00
posix4 The sem_timedwait() and ksem_timedwait() functions both 2004-02-03 22:27:03 +00:00
powerpc - add a description of what .gdbinit should contain. 2004-02-04 13:23:05 +00:00
rpc Don't panic because of RPC proto mismatches. Whitespace cleanup. 2004-01-17 21:25:05 +00:00
security Commit file missed in last pass: MAC api uses 'struct pipepair', not 2004-02-01 21:52:09 +00:00
sparc64 - Fix for sparc64 to use new __panic() function 2004-01-27 15:02:18 +00:00
sys Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
tools
ufs Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
vm Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
Makefile Replaced outdated comment. 2004-01-17 03:28:27 +00:00