summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2004-02-10Fix off-by-one wrt TTY_LETTERS and minor being out of bounds. MissedTodd C. Miller
when I fixed the other TTY_LETTERS/TTY_SUFFIX off-by-ones.
2004-02-10Add the ptm device to pty(4). By opening /dev/ptm and using the PTMGETTodd C. Miller
ioctl(2), an unprivileged process may allocate a pty and have its owner and mode set appropriately. This means that programs such as xterm and screen no longer need to be setuid. Programs using the openpty() function require zero changes and will "just work". Designed by beck@ and deraadt@; changes by beck@ with cleanup (and a rewrite of the vnode bits) by art@ and tweaks/bugfixes by me. Tested by many.
2004-02-10Dynamically allocate space for ptys; adapted from NetBSD by beck@Todd C. Miller
2004-02-08restored & repaired wcookie support; kettenis@chello.nlTheo de Raadt
2004-02-05Decrement reference count in error case if uvm_map(9) fails and weTodd C. Miller
had previously increased the reference count. Should not happen, but... From dhartmei@; ok deraadt@
2004-02-05Correct a reference counting bug in shmat(2); adapted from FreeBSD.Todd C. Miller
OK deraadt@ tedu@ dhartmei@
2004-02-01Grok union like struct in genassym.cf. Will be needed shortly.Miod Vallat
2004-01-29The Sxxx proc state defines start at 1, not 0. Also make the constTodd C. Miller
usage more correct and fix a signed/unsigned format mismatch. Based on a patch from Patrick Latifi. OK deraadt@
2004-01-28oh, i'll happily steal the commit. ok henning@, markus@, otto@ (iirc)Daniel Hartmeier
from KOZUKA Masahiro, fixes PR 3651
2004-01-26having the monotonic thing as DEBUG is not going to get it fixed faster, it ↵Theo de Raadt
is just going to annoy people
2004-01-21dynamic bufq support. basically a nullop. ok grange@Ted Unangst
2004-01-21call timeout_startup early, so timeouts are available. report from sam smithTed Unangst
ok art deraadt
2004-01-14Get rid of M_LOCKF and use pool for allocating lockf structures.Alexander Yurchenko
From NetBSD. Tested by many people, ok art@.
2004-01-14syncTed Unangst
2004-01-14change sigaltstack.ss_size type to size_t. handle syscall fallout.Ted Unangst
add stack_t and ucontext_t typedefs. ok deraadt@
2004-01-12syncTed Unangst
2004-01-12new syscall closefrom(int fd) closes all fds equal and greater than fd.Ted Unangst
ok deraadt@ millert@
2004-01-12klist_invalidate to help clean up when the backend disappears, tested by mpf@Ted Unangst
2004-01-12these need to be synced when vnode_if.src changesTed Unangst
2004-01-09back out vnode parents. weird breakge found in ports treeTed Unangst
2004-01-07Add p_rlim_rss_cur for ps "lim" field. OK deraadt@Todd C. Miller
2004-01-07no kern_watchdog for SMALL_KERNEL; ok deraadt@Markus Friedl
2004-01-07Unbreak KERN_PROC_KTHREAD. Explicitly list KERN_PROC_KTHREAD inTodd C. Miller
the sysctl_doproc() switch so it does not match the default case (EINVAL). deraadt@ OK.
2004-01-07Add p_emul to kinfo_proc2 for psTodd C. Miller
2004-01-07Implement KERN_PROC2 sysctl from NetBSD. This will allow us toTodd C. Miller
have ps and friends be independent of changes in struct proc et al in the kernel. OK deraadt@
2004-01-06keep track of a vnode's parent dir. ufs only, and unused atm, butTed Unangst
the fun stuff is coming. testing by brad.
2004-01-06lock filedesc before manipulating. avoids some rare races.Ted Unangst
testing for quite some time by brad + otto
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