summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2010-06-21No need to include mutex.h twice.Thordur I. Bjornsson
Pointed out by Jung <moorang at gmail dot com>
2010-06-20Add some missing includes, so we do not have implicit functionPeter Hessler
declarations. OK miod@, millert@
2010-06-19Skip exiting procesess in sysctl_file2(). As processes in exit1()Thordur I. Bjornsson
do a pdfree() way before they remove themself from the allproc list. This prevents a null deref found by todd@. Joint work with mikeb OK millert@, tedu@
2010-06-17aligment -> alignmentMiod Vallat
2010-06-10Declare safepri at the MD level on each platform, so that the kern_synch.cTheo de Raadt
does not have to deal with it as a common. Some platforms may be missed by this commit... if you spot one, fix it the same way. ok miod
2010-06-07Replace some handrolled instances of m_getptr() with that function, whichBret Lambert
also gets a bit of a KNF scrubbing at claudio@'s insistence. Shaves some bytes from the kernel as well. tested by phessler@ and zinovnik@, thanks ok claudio@
2010-06-01add beagle, mentioned by drahnTheo de Raadt
2010-05-31This file never contained anything of value.Theo de Raadt
2010-05-31Completely rewrite the tags file creation process. use config(8) againstTheo de Raadt
a fat kernel (GERERIC or GENERIC.MP) into a temporary dir, then extract some variables using make -V, and after some more singing and dancing use this full and (more) correct list of files with ctags. Don't read this code. ok guenther
2010-05-31attempt to partially update the list of arch's and src dirs, though weTheo de Raadt
really should do this more automatically (ideas being discussed) ok guenther
2010-05-30Tweak bufq code to handle corner cases. Makes upcoming cd(4)Kenneth R Westerback
conversion to bufq work. Taken from n2k10 scsi buf queueing code. ok thib@
2010-05-29As noted by art, two processes with the same pid would be bad. GrabPhilip Guenthe
the allproclk before searching for a free pid so that we don't sleep between picking one and adding it to the list that is searched. Also, keep holding the lock until after the PIDHASH update. ok art@, tedu@
2010-05-28Delete a fallback definition for CPU_INFO_UNIT that's both unnecessaryPhilip Guenthe
and incorrect. Kills an XXX comment. ok syuu, thib, art, kettenis, millert, deraadt
2010-05-27Switch the signal status "percent" sensor, which is currentlyStuart Henderson
hardcoded(!), over to an "indicator" sensor type, value depending on whether the GPS has fix. ok deraadt@
2010-05-26Trying this again. Mixing anoncvs with cvs is _not_ a good idea.Thordur I. Bjornsson
Reintroduce bufqs. A few changes since it was backed out after some good comments from dlg@. No need for a separate bufq.h, keep all of in buf.h; As requested by kittens and deraadt. Only sd(4) and wd(4) for now. The rest of the drivers will be converted soon, also other goodies like heuristics for sd(4) for selecting the bufq type and the death of disksort() are forthcoming. Tested on: i386, amd64, sparc64, macppc, loongson and alpha by myself and phessler. OK art@, beck@, kettenis@, oga@
2010-05-26Bad tedu, no cookie.Owain Ainsworth
Don't set SDEAD on the process in exit1 untile we have grabbed the allproclk. allproclk is a rwlock and thus we may sleep to grab hold of it. This is a big of a bugger when we just set a flag that means we panic if we sleep. ok art@. turns Tom Murphy's fstat panic into a deadlock instead *sigh*, this is being looked into.
2010-05-25Actively remove processes from the runqueues of a CPU when we stop it.Mark Kettenis
Also make sure not to take the scheduler lock once we have stopped a CPU such that we can safely take it away without having to worry about deadlock because it happened to own the scheduler lock. Fixes issues with suspen on SMP machines. ok mlarkin@, marco@, art@, deraadt@
2010-05-20Don't dereference cp to shut gcc4 up (the intent anyway).Marco Peereboom
ok drahn oga
2010-05-19clean up a few things that where left to rot after bob's vfs cache work.Thordur I. Bjornsson
sync a few comments to reality (or remove them), remove the cn_hash member from struct componentname, spacing. ok beck@
2010-05-18move knote list to struct process. ok guentherTed Unangst
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2010-05-14Make sure we initialize sched_lock before we try to use it.Mark Kettenis
ok miod@, thib@, oga@, jsing@
2010-05-06Fix favail format string.Marco Pfatschbacher
From mickey. OK thib, otto.
2010-05-03Provide a disk_map() function which attempts to map a disklabel UID to theJoel Sing
actual device. If successful, the real path is returned via mappath. Soon to be used by several other diffs. ok krw@
2010-05-02Use intermediate vaddr_t cast when casting a pointer to off_t. PreventsMark Kettenis
gcc4 from complaining about casting a pointer to an integer type of different size. ok guenther@, jsg@
2010-04-30Right now, if anything internal changes with a uvm object, diverseOwain Ainsworth
places in the tree need to be touched to update the object initialisation with respect to that. So, make a function (uvm_initobj) that takes the refcount, object and pager ops and does this initialisation for us. This should save on maintainance in the future. looked good to fgs@. Tedu complained about the British spelling but OKed it anyway.
2010-04-28When setting a disklabel automatically generate a new UID if it does notJoel Sing
already have one. ok krw@
2010-04-26cut down simple locks (so simple that they don't even lock) to the pointTheo de Raadt
where there is almost nothing left to them, so that we can continue getting rid of them ok oga
2010-04-25introducing a 64-bit type to the disklabel structure leads some architecturesTheo de Raadt
to pad-align the size of the structure; it grows, the disklabel ioctl's are break ABI. Change the uid to a character array. this also simplifies some other stuff ok jsing
2010-04-23Merge the only relevant (for now) parts of simplelock.h into lock.hTheo de Raadt
since it is time to start transitioning away from the no-op behaviour. ok oga kettenis
2010-04-23Recycle unused disklabel fields in order to create a disklabel uniqueJoel Sing
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
2010-04-23Remove unnecessary pointer dereference causing gcc2 to warn.Miod Vallat
2010-04-21Provide nmea(4) position information using the new angle sensor type.Stuart Henderson
Use SENSOR_FINVALID until we have good data, suggested by deraadt@ "i am happy" deraadt@
2010-04-21the atomic primitives are still impossible to get at without using proc.hTheo de Raadt
(because it pulls in so much of the world) so include it for now, but mark it XXX ok tedu
2010-04-20remove proc.h include from uvm_map.h. This has far reaching effects, asTed Unangst
sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
2010-04-20Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handledTheo de Raadt
by returning ENXIO instead of ENOENT, to essentially indicate hotplug sensor that has gone away. Accessing beyond the end of the sensordev list still returns ENOENT, so that you can see there are no further devices. ok kettenis oga
2010-04-12Some of the line disciplines want to check for suser. Better to pass themTed Unangst
a process instead of using curproc. ok deraadt
2010-04-11In sys_ioctl(), change the type of stkbuf to u_long to make sure it isMark Kettenis
properly aligned. Otherwise we lose on strict alignment architectures if the compiler happens to give it a smaller alignment. Fixes another gcc4 problem on sparc64. ok miod@
2010-04-06Implement functions to take away the secondary CPUs from the scheduler andMark Kettenis
give them back again, effectively stopping and starting these CPUs. Use the stop function in sys_reboot(). ok marco@, deraadt@
2010-04-04clock_settime() should cancel an in-progress adjtime() just likePhilip Guenthe
settimeofday() does, so move those bits into settime() "I like it" deraadt@
2010-04-02Add a case so that FIONREAD on the master side of a pty returns the sizeNicholas Marriott
of the output queue (that is, the data coming from the program on the slave side) rather than falling through to ttioctl which returns the size of the input queue (the amount written to the master). ok deraadt
2010-03-24Add a rwlock around the filehead and allproc lists, mainly to protectTed Unangst
list walkers in sysctl that can block. As a reward, no more vslock. With some feedback from art, guenther, phessler. ok guenther.
2010-02-28Remove leftover debug printf in config_activate_children(); ok deraadtMiod Vallat
2010-02-05Use correct format specifiers for 'show bcstats'.Joel Sing
ok beck@ krw@
2010-01-28Make sure the process tree is is loop-free by forbidding ptrace()Philip Guenthe
of a direct ancestor, closing a localhost DoS. As an exception, do permit ptrace() of pid 1 and have inferiors() stop climbing if it hits that. ok tedu@ hpux_compat suggestion from miod@
2010-01-18regen, even though there is no code change, such that the RCS IDs match,Ingo Schwarze
as suggested by art@
2010-01-18fix a spelling error in a comment, no code change; from Brad TilleyIngo Schwarze
ok miod@ art@
2010-01-16When allocating from the item header pool, we can't sleep, as we may be ↵Ted Unangst
holding a mutex which won't be released. From Christian Ehrhardt. While here, fix another buglet: no need to pass down PR_ZERO either, as noticed by blambert@.
2010-01-14fix typos in comments, no code changes;Ingo Schwarze
from Brad Tilley <brad at 16systems dot com>; ok oga@
2010-01-12Since ifinit() is now safe to be called earlier, call it just beforeTheo de Raadt
configure(), since some upcoming changes will require it. ok henning