summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stop using USRSTACK as the edge of the stack, but rather use the vmspacemiod2015-02-091-6/+11
| | | | | | | | vm_minsaddr or vm_maxsaddr, depending upon the direction the stack goes in. This should have no effect on the existing behaviourrr. ok kettenis@ deraadt@
* start retiring the nointr allocator. specify PR_WAITOK as a flag as atedu2014-12-191-3/+3
| | | | marker for which pools are not interrupt safe. ok dlg
* convert bcopy to memcpy. ok millerttedu2014-12-101-2/+2
|
* Replace a plethora of historical protection options with justderaadt2014-11-161-3/+3
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Eliminates struct pcred by moving the real and saved ugids intoguenther2014-03-301-7/+7
| | | | | | | | | struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
* exit1() needs to do a final aggregation of the thread's [us]ticksguenther2014-01-241-3/+7
| | | | | | | | and runtime to the process totals. Also, add ktracing of struct rusage in wait4() and getrusage(). problem pointed out by tedu@ ok deraadt@
* bzero -> memsettedu2014-01-211-2/+2
|
* Threads can't be zombies, only processes, so change zombproc to zombprocess,guenther2014-01-201-14/+9
| | | | | | | | make it a list of processes, and change P_NOZOMBIE and P_STOPPED from thread flags to process flags. Add allprocess list for the code that just wants to see processes. ok tedu@
* Move the declarations for dogetrusage(), itimerround(), and dowait4()guenther2013-10-251-3/+1
| | | | | | | | | | to sys/*.h headers so that the compat/linux code can use them. Change dowait4() to not copyout() the status value, but rather leave that for its caller, as compat/linux has to translate it, with the side benefit of simplifying the native code. Originally written months ago as part of the time_t work; long memory, prodding, and ok from pirofti@
* Eliminate the unused retval argument from dogetrusage()guenther2013-09-141-4/+4
|
* Snapshots for all archs have been built, so remove the T32 codeguenther2013-09-141-23/+1
|
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-11/+42
| | | | | | | | | | | | | | | | | | | | members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
* Convert some internal APIs to use timespecs instead of timevalsguenther2013-06-031-17/+31
| | | | ok matthew@ deraadt@
* Make setrlimit() return EINVAL if rlim_cur > rlim_max, per POSIX.guenther2013-04-011-5/+4
| | | | | | Use limfree() instead of decrementing the reference counter directly. ok kettenis@
* Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimitguenther2012-04-101-2/+2
| | | | | | | | count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread. ok tedu@ mikeb@
* Make rusage totals, itimers, and profile settings per-process insteadguenther2012-03-231-32/+59
| | | | | | | of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
* Add tracing and dumping of "pointer to struct" syscall arguments forguenther2012-03-191-3/+15
| | | | | | structs timespec, timeval, sigaction, and rlimit. ok otto@ jsing@
* The scheduling 'nice' value is per-process, not per-thread, so move itguenther2011-03-071-15/+11
| | | | | | into struct process. ok tedu@ deraadt@
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-261-27/+65
| | | | | | | | | so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
* Eliminate struct plimit's PL_SHAREMOD flag: it was for COMPAT_IRIXguenther2010-06-291-4/+2
| | | | | sproc() support, but we don't have COMPAT_IRIX. ok krw@ tedu@
* Don't decrement the refcnt on a plimits until after we're doneguenther2010-01-041-3/+6
| | | | | | | copying it, so that the process can't sleep in pool_get() and have the source structure get pool_put() or modified behind its back. ok deraadt@
* Use LIST_FOREACH() instead of handrolling.thib2008-05-221-3/+3
| | | | | From: Pierre Riteau pierre.riteau_att_gmail.com OK miod@
* move p_limit and p_cred into struct processtedu2007-04-121-5/+5
| | | | | leave macros behind for now to keep the commit small ok art beck miod pedro
* ansi/deregister.jsg2005-11-281-49/+25
| | | | 'go for it' deraadt@
* sched work by niklas and art backed out; causes panicsderaadt2005-05-291-2/+2
|
* This patch is mortly art's work and was done *a year* ago. Art wants to thankniklas2005-05-251-2/+2
| | | | | | | | | | | | | | | | everyone for the prompt review and ok of this work ;-) Yeah, that includes me too, or maybe especially me. I am sorry. Change the sched_lock to a mutex. This fixes, among other things, the infamous "telnet localhost &" problem. The real bug in that case was that the sched_lock which is by design a non-recursive lock, was recursively acquired, and not enough releases made us hold the lock in the idle loop, blocking scheduling on the other processors. Some of the other processors would hold the biglock though, which made it impossible for cpu 0 to enter the kernel... A nice deadlock. Let me just say debugging this for days just to realize that it was all fixed in an old diff noone ever ok'd was somewhat of an anti-climax. This diff also changes splsched to be correct for all our architectures.
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-4/+3
| | | | no change in compiler assembly output.
* debranch SMP, have funniklas2004-06-131-1/+5
|
* Add id_t type as per POSIX and use it for [gs]etpriority(2).millert2003-12-111-3/+3
| | | | OK henning@ and deraadt@
* POSIX says rlim_t should be unsigned so make it u_quad_t. Also addmillert2003-12-111-4/+1
| | | | | POSIX-mandated RLIM_SAVED_MAX and RLIM_SAVED_CUR defines. On OpenBSD these are identical to RLIM_INFINITY as allowed by POSIX. OK deraadt@
* match syscallargs comments with realityhenning2003-09-011-2/+2
| | | | | from Patrick Latifi <patrick.l@hermes.usherb.ca> ok jason@ tedu@
* change arguments to suser. suser now takes the process, and a flagstedu2003-08-151-3/+3
| | | | | | | | | argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Match reality by changing (u_int) -> (int) in comments.nordin2002-10-151-2/+2
|
* Check for negative values. Inspiration from tedu <grendel@zeitbombe.org>.nordin2002-10-021-3/+3
| | | | ok deraadt@ and art@
* Map stack pages without VM_PROT_EXECUTE. Notice that right now thisart2002-07-211-2/+2
| | | | doesn't do anything since no pmap implements exec protection yet.
* Convert plimit allocations to pool.art2002-01-251-11/+16
|
* Make user/system times increase monotonically. ok deraadt@ and millert@nordin2001-12-201-30/+17
|
* Move maxdmap and maxsmap to kern_resource.cart2001-11-101-2/+7
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-3/+1
| | | | (Look ma, I might have broken the tree)
* remove old vmart2001-06-271-8/+1
|
* Make it a bit more obvious what dosetrlimit does. (shrink).art2001-05-261-30/+25
|
* Add limfree prototype to sys/recosurcevar.h.art2000-05-051-2/+1
|
* Use LIST_ macros instead of internal field names to walk the allproc list.art2000-03-031-3/+3
|
* more stack direction fixes; art@ okmickey1999-11-051-1/+9
|
* vm_offset_t -> {v,p}addr_t ; vm_size_t -> {v,p}size_tart1999-07-151-3/+3
|
* uvm allocation and name changesart1999-02-261-1/+10
|
* Sync with NetBSD. Figure NZERO into priorities and that rlim_curmillert1996-11-241-5/+10
| | | | and rlim_max are >0.
* sec can be a longderaadt1996-07-271-3/+2
|
* unsigned usec can go negative, should be added in as is; netbsd pr#2585; Juergen.Fluk@lrz.tu-muenchen.dederaadt1996-07-021-2/+3
|