summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2004-01-03put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosMarc Espie
to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
2004-01-012004Theo de Raadt
2003-12-31regenTodd C. Miller
2003-12-31wait4(2) takes and returns pid_t, not int. OK deraadt@ and miod@Todd C. Miller
2003-12-28make check for too large allocations earlier, instead of fiddling with it.Ted Unangst
less error prone (no wraparound). no real functional change though. ok markus tdeval
2003-12-23enough is enough, driving people insane is not niceTheo de Raadt
2003-12-23print tv_usec fields correctly in reporting conmonotonic timeMichael Shalayeff
2003-12-22Remove duplicated code (pasto)Todd C. Miller
2003-12-21Kill non-standard kernel printf %: braindead extension for good.Miod Vallat
ok markus@ drahn@
2003-12-20In semop(2), use an array on the stack for small values of nsops soTodd C. Miller
we don't have to use malloc/free. Adapted from FreeBSD; ok tedu@
2003-12-19Add a check for time not flowing monotonically and just don't changeTodd C. Miller
p->p_rtime in this case instead of zeroing it; based on an idea from nordin@. Also add a printf about microtime() not being monotonic for this case (from miod@) #ifdef DIAGNOSTIC. This version OK otto@
2003-12-18add new hw sysctls, cpuspeed and setperf to control cpu frequency.Ted Unangst
convert longrun support to use new sysctls. add enhanced speedstep support, based on code by Michael Eriksson. idea, help testing & ok deraadt@
2003-12-17Use SLIST macros instead of rolling our own. Idea from and partlyTodd C. Miller
based on changes from FreeBSD.
2003-12-15Fix some sign issues that fell out from the change of rlim_t to unsigned.Todd C. Miller
Also add a check for a negative result when subtracting microtime(&now) from runtime and simply treat this as zero. This should *not* happen but due to an apparent bug in microtime on dual clock machines, it does. The microtime bug is currently being examined. Based on a diff from miod@ with help from otto@; ok deraadt@ otto@
2003-12-15workaround a clock tick handling bug that the rlimit code just exposed.Theo de Raadt
2003-12-11regen now that [gs]etpriority(2) take id_t, not int.Todd C. Miller
2003-12-11Add id_t type as per POSIX and use it for [gs]etpriority(2).Todd C. Miller
OK henning@ and deraadt@
2003-12-11POSIX says rlim_t should be unsigned so make it u_quad_t. Also addTodd C. Miller
POSIX-mandated RLIM_SAVED_MAX and RLIM_SAVED_CUR defines. On OpenBSD these are identical to RLIM_INFINITY as allowed by POSIX. OK deraadt@
2003-12-10missed in previous commitTodd C. Miller
2003-12-10regen after poll(2) changeTodd C. Miller
2003-12-10Add an nfds_t type as per POSIX and also add pollfd_t like Solaris has.Todd C. Miller
2003-12-03Pass -Wsign-compare and avoid a potential malloc(0); ok henning@Todd C. Miller
2003-12-02Check array index before using it; from Tim Robbins via Niels.Todd C. Miller
2003-11-23Check correct array index KERN_VNODE; from Alistair KerrTodd C. Miller
Closes PR 3571 as per on icb.
2003-11-20Correct bounds check in semop(2) and semctl(2)Todd C. Miller
2003-11-18don't leave test code enabled, spotted Dries SchellekensTed Unangst
2003-11-18add lightwight reader/writer locks from art@. we will be using theseTed Unangst
later. have been looked over for quite some time now.
2003-11-18faster pools. split pagelist into full, partial, and empty so we find whatTed Unangst
we're looking for. change small page_header hash table to a splay tree. from Chuck Silvers. tested by brad grange henning mcbride naddy otto
2003-11-08typos from Jonathon Gray;Jason McIntyre
2003-11-03verify exec headers before attempting malloc. reported by Georgi Guninski.Ted Unangst
2003-11-03use arc4random_bytesTed Unangst
2003-10-31allocate at least as much elements as requested in hashinitMarkus Friedl
fixes pr 3537, based on patch from daniel@nofsk.nofsk.au.eu.org ok millert@, deraadt@, tedu@
2003-10-26per deraadt@ request, don't permit insanely large stackgap values.Ted Unangst
2003-10-24refactor stackgap sysctl. prompted by a bug report from Michael Coulter.Ted Unangst
ok deraadt@ markus@
2003-10-12Linux shmat allows lookup of segments that are marked as removed soTodd C. Miller
our Linux compat should too. From marius aamodt eriksen
2003-10-08originally from cb@netbsd.org, adapted by provosNikolay Sturm
itojun@ ok fix a race condition between path resolution in userland and the subsequent namei(): inform the kernel portion of valid filenames and then disallow symlink lookups for those filenames by means of a hook in namei(). with suggestions from provos@ also, add (currently unused) seqnr field to struct systrace_replace, from provos@
2003-10-03Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need forMiod Vallat
separate tty registering is gone now that sparc has switched to wscons, and this makes the code less error-prone. Also, remove tests for ttymalloc() failure, since it uses M_WAITOK. ok millert@ deraadt@, tested by various people as well besides me...
2003-10-03Bring several fixes from FreeBSD to our current pipe implementation:Miod Vallat
- when allocating or growing a pipe buffer is not possible, do not panic but report the error and handle it correctly. (1.73) - "The pipe_write() code was locking the pipe without busying it first in certain cases, and a close() by another process could potentially rip the pipe out from under the (blocked) locking operation." (from Al Viro, 1.81) - "Remove test in pipe_write() which causes write(2) to return EAGAIN on a non-blocking pipe in cases where select(2) returns the file descriptor as ready for write. This in turns causes libc_r, for one, to busy wait in such cases. Note: it is a quick performance fix, a more complex fix might be required in case this turns out to have unexpected side effects." (1.141)
2003-09-23Limit "proc: table is full" messages to once every 10 seconds which helps ↵Todd C. Miller
when there is a fork bomb going on. From NetBSD (jdolecek)
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-09-23regen (Prepare for conversion of select backend -> poll)Todd C. Miller
2003-09-23Prepare for conversion of select backend -> pollTodd C. Miller
2003-09-09fix potential int overflow found by blexim at hush.com. restrict root toTed Unangst
setting max sems to sane values. ok deraadt@
2003-09-07RegenMiod Vallat
2003-09-07No COMPAT_10 SYSVSHM syscalls on sparc64; ok deraadt@Miod Vallat
2003-09-01match syscallargs comments with realityHenning Brauer
from Patrick Latifi <patrick.l@hermes.usherb.ca> ok jason@ tedu@
2003-08-26fix sys_clock_settime. hint from nordin@ ok deraadt@Ted Unangst
2003-08-23remember to reset exec_maxhdrsz after lkm load/unload. ok fgsch@Ted Unangst
2003-08-23remove native emulations from emulsw. you can't change them and probablyTed Unangst
aren't interested, so keep them out of the sysctl. ok deraadt
2003-08-23knfTheo de Raadt