summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
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
2003-08-23allow disabling a emul after enabling it; tedu@ ok.Federico G. Schwindt
2003-08-21emulation is now controlled by sysctl. changes:Ted Unangst
add e_flags to struct emul. this stores on/off and native flags. check for emul enabled in check_exec(). gather all the emuls into a emulsw so a sysctl can find them. create sysctl. move maxhdrsiz calcualation into init_main so it cleans up sys_execve codepath. teach sysctl utility to grok kern.emul hierarchy. requested and ok deraadt@ some comments from mickey@
2003-08-21sys/types.h is not really needed with sys/param.h; ok mickey@Kevin Lo
2003-08-20Move the nsem sanity checks where they belong (before the malloc call).Todd C. Miller
This was missed when that code got restructured/re-ordered. Problem reported by blexim AT hush d0t com. OK deraadt@, tedu@, henning@ and miod@
2003-08-18spelling in comment, jonathon grayTed Unangst
2003-08-17unused varTed Unangst
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
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@
2003-08-14constify vfsops; tedu@ okMichael Shalayeff
2003-08-12src argument to m_copyback() can be a const; itojun@ okMichael Shalayeff
2003-08-11constify constant constsMichael Shalayeff
2003-08-11implement CLOCK_MONOTONIC from NetBSD; ok marc@Kevin Lo
2003-08-06Remove some double semicolons (hmm, do two semis equal a maxi?).Todd C. Miller
I've skipped the GNU stuff for now. From Patrick Latifi.
2003-08-06Remove unreachable return statement after break; Patrick LatifiTodd C. Miller
2003-08-04Use strlcpy(), not strncpy() when copying p->p_comm to core.c_nameTodd C. Miller
to guarantee NUL termination; from Patrick Latifi.
2003-08-03Implement the WCONTINUED flag to the wait(2) family of syscalls and theTodd C. Miller
associated WIFCONTINUED macro as per 1003.1-2001. Adapted from FreeBSD. A minor amount of trickiness is involved here. The value for WCONTINUED is chosen in such a way that _WSTATUS(_WCONTINUED) == _WSTOPPED and the WIFSTOPPED macro has been modified such that WIFSTOPPED(_WCONTINUED) != _WSTOPPED. This means we don't need to add an extra check to the WIFSIGNALED and WIFSTOPPED macros. deraadt@ OK.
2003-07-24kill some externs that are not there anymore and had left other places for a ↵Michael Shalayeff
better void ages ago
2003-07-22make it compile again damnit; from slash@peereboom.usMichael Shalayeff
2003-07-21syncTed Unangst
2003-07-21remove caddr_t casts. it's just silly to cast something when the functionTed Unangst
takes a void *. convert uiomove to take a void * as well. ok deraadt@
2003-07-18check v_mount for NULL before using. ok art@Ted Unangst
2003-07-02bump mktemp randomness from 6->10 X'sAnil Madhavapeddy
2003-07-02comitted->committed in a commentAnil Madhavapeddy
2003-07-01syncTed Unangst