summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2008-09-19system/5918: fix clearing of ITIMER_VIRTUAL and ITIMER_PROF it_intervalDamien Miller
ok tedu@
2008-09-19Fix a bunch of problems and races with posix file locking.Artur Grabowski
- file descriptor table becomes the owner of the lock instead of the proc. - When grabbing the lock, we check if the fd hasn't changed under our feet, this is more or less impossible to solve without a hack like this. I've banged my head against the wall, I figured out a solution, but implementing it correctly would cost me 12 gray hairs. Screw it, this is ugly, but it works. - Wait until usecount drains before releasing the posix lock in closef. - Add missing FREF/FRELE to sys_flock - keep the pid in the flock struct instead of abusing the fact that we used to use the proc as the lock owner. Pointed out by and discussed with Al Viro, big thanks. miod@ ok
2008-09-19increase MAXINTERP from 64 to 128 and allow a little extra room on topDamien Miller
of that for shell scripts to cover the #!, an optional space following it and a newline at the end. feedback and ok miod@
2008-09-16Add PIOD_READ_AUXV, a way to get the ELF auxilliary vector through ptrace(2).Mark Kettenis
ok miod@
2008-09-16netstat statistics for pflow(4) via pseudo familyJoerg Goltermann
ok cluadio@ henning@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-09-10There's no need to fully traverse the wakeup queue when waking a specificBret Lambert
process sleeping on a unique address (wakeup -> wakeup_one) ok guenther@, tedu@, art@
2008-09-05Back out previous. Art realised a problem with it.Owain Ainsworth
2008-09-05Don't overwrite the old ipl in msleep if PNORELOCK was set.Artur Grabowski
2008-09-05When munging the WANTIPL of the mutex to prevent undoing the sched_lock,Owain Ainsworth
use the constant for IPL_SCHED, and not splsched(), which doesn't do what we want. ok art@. Tested by Paul de Weerd.
2008-08-25If partoffp is non-NULL then readdoslabel() is just looking for theKenneth R Westerback
correct address to write the passed label. Don't spoof partitions while looking for the address, as this could result in an invalid label being written out. "That looks right" deraadt@ "Looks good to me" miod@
2008-08-22simplification, and repair findblkmajor for name## lookups; ok krwTheo de Raadt
2008-08-20Allow devices attaching at root (such as softraid) to be disabled in UKC.Miod Vallat
ok marco@ deraadt@
2008-08-14Kill the _MCLDEREFERENCE() macro it was only used once and it should be onlyClaudio Jeker
used once -- in m_free(). Removed so that people don't get stupid ideas. OK thib@
2008-08-08Admit b_blkno means block number; a block is DEV_BSIZE (a.k.a.Kenneth R Westerback
512) bytes; ffs is inextricably tied to using b_blkno and disklabel always uses sectorsize units. Thus use DEV_BSIZE units for all fields describing ffs filesystems and convert to/from sectors where required. This enables the creation and use of ffs filesystems on non-512 byte sectorsize devices. This diff allows i386 and sgi (the two test platforms) to find disklabels that are not on a sectorsize boundary. Same change to further archs coming. This is a no-op on 512-byte sectorsize devices. This work triggered by jsing@'s need to create ffs filesystems on sgi cdroms so we can create cdrom install media for sgi. sgi testing by jsing@ ok jsing@ pedro@ "looks sane" beck@ weingart@
2008-08-08remove an if notyet block from sys_fstatfs(), that will never be needed,Thordur I. Bjornsson
softupdates are reported too statfs via other means. missed this block in in rev1.148 where the same block was removed from sys_statfs().
2008-08-08plug an mbuf leak in m_pullup2(); If we fail to get a cluster for an mbuf,Thordur I. Bjornsson
free the mbuf before bailing out. ok claudio@
2008-08-07don't wait for a free mbuf cluster in sosend() and enter the existingReyk Floeter
error handler that was never used before. this fixes a bug that a userland process might hang if the system ran out of mbuf clusters or even other unexpected behaviour in the network drivers. this bug is very old - it is also found in rev 1.1/stevens v2/44lite2/... discussed with many ok markus@ thib@ dlg@
2008-08-03Make buf_dealloc_mem() remove the mapping even if b_pobj is NULL. OtherwiseMark Kettenis
bread_cluster() leaks mappings which causes grief on VAC architectures. Fixes bsd.rd on hppa and armish. ok art@, beck@
2008-08-02Fix integer truncation in pcread() and ptcwrite(). ok miod, otto, deraadt.Stefan Kempf
2008-07-28remove an #if noyet block that will never be needed.Thordur I. Bjornsson
softupdates are reported too statfs via the mount point flags or the mount_info part of statfs; ok pedro@
2008-07-28Fix integer truncation in ttwrite(). ok deraadt, miod.Stefan Kempf
2008-07-24remove a bunch of bogus ARGSUSEDThordur I. Bjornsson
2008-07-22deactivate the code to display location in the sensor descriptionMarc Balmer
2008-07-18Add a macro that clears the want_resched flag that need_resched sets.Artur Grabowski
Right now when mi_switch picks up the same proc, we didn't clear the flag which would mean that every time we service an AST we would attempt a context switch. For some architectures, amd64 being probably the most extreme, that meant attempting to context switch for every trap and interrupt. Now we clear_resched explicitly after every context switch, even if it didn't do anything. Which also allows us to remove some more code in cpu_switchto (not done yet). miod@ ok
2008-07-18Add support for the kernel to recognize, load and execute positionKurt Miller
independent executables using the uvm_map_pie() function to randomize the load address. okay miod@, kettenis@, drahn@
2008-07-14Don't lock timeouts in db_show_callout.Artur Grabowski
All cpus are stopped and this cpu blocks all interrupts. It doesn't make sense to grab locks that ddb can then jump past with longjmp. Noticed by Pierre Riteau. I just forgot about the bug until reminded today.
2008-07-11Add timeout_add_{tv,ts,bt,sec,usec,nsec} so that we can add timeoutsBret Lambert
in something other than clock ticks. From art@'s punchlist and (for the time being) not yet used. "you're doing it wrong" art@,ray@,otto@,tedu@ ok art@
2008-07-11de-__inline a trio of functions to shave some space.Bret Lambert
ok art@
2008-07-07Shorten the sensor description and reserve room for optional charactersMarc Balmer
only when they are needed. Makes locations like -123d45m,-123d45m fit.
2008-07-06Add the position to the sensor description.Marc Balmer
discussed with otto, sthen, ckuethe. ok otto
2008-07-05re-introduce vdrop() to signal a lost intrest in a vnode;Thordur I. Bjornsson
ok art@
2008-06-27Do not disallow kernel crash dumps on panic if swap encryption is enabled,Miod Vallat
as dumpsys() will now clear the sensitive information. ok djm@ (and dumpsys changes too)
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-25allow to install and boot the OpenBSD A6 partition and disklabel in anReyk Floeter
extended DOS partition. the concept of extended partitions is very simple, it is just another mbr at the partition offset (well, the standard "EBR" is a linked list with a few limitations, but this diff works with both variants). this diff has been in the snapshots for a while. with input from weingart@ and krw@ ok deraadt@
2008-06-14A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO)Michael Knudsen
conversions that should shave a few bytes off the kernel. ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer FOO|BAR''; thanks for looking.
2008-06-14oldnointr pool allocator is no longer used or necessary.Artur Grabowski
2008-06-14Belt, suspenders, duct tape and glue.Artur Grabowski
In brelse, if we end up in the B_INVAL case without mappings, check for B_WANTED and wake up the sleeper if there's one before freeing the buffer. This shouldn't happen, but it looks like there might actually be some dodgy corner cases in nfs where this could just happen if the phase of the moon is right and the wind is blowing from the right direction. thib@ ok
2008-06-13back out stupid vnode change that was unintentionally includedBob Beck
with biomem and art has no idea how it got there. ok art@ thib@
2008-06-13Delete vfs_bufstats() leftovers and unbreak compile with -DDEBUGRainer Giedat
Ok reyk@, "kill kill kill" thib@
2008-06-12use PR_ZERO instead of a bzero() right after the pool_get();Thordur I. Bjornsson
ok blambert@
2008-06-12Oops, do not dereference a NULL function pointer used as an array endMiod Vallat
marker; found the hard way by sturm@
2008-06-12Remove silly panic when disestablish cookie doesnt existMarco Peereboom
ok art
2008-06-12Bring biomem diff back into the tree after the nfs_bio.c fix went in.Theo de Raadt
ok thib beck art
2008-06-12Reorder foreign binaries probe list, so that more permissive ones are at theMiod Vallat
end. Makes static linux binaries run again.
2008-06-11Don't use the reference count to create the sensor name; we can end upMarc Balmer
with sensors with the same name. The sensor name is now ever increasing unless the reference count drops to zero, in which case the naming restarts at zero as well.
2008-06-11back out biomem diff since it is not right yet. Doing very largeTheo de Raadt
file copies to nfsv2 causes the system to eventually peg the console. On the console ^T indicates that the load is increasing rapidly, ddb indicates many calls to getbuf, there is some very slow nfs traffic making none (or extremely slow) progress. Eventually some machines seize up entirely.
2008-06-11store a pointer to the stack side state key in the mbuf packetHenning Brauer
header inbound. on the outbound side, we take that and look for the key that is the exact opposite, and store that mapping in the state key. on subsequent packets we don't have to do the lookup on outbound any more. almost unable to get real benchmarks going here, we know for sure this gives a more than 5% increase in forwarding performance. many thanks to ckuethe for stress- and performance-testing. ok ryan theo
2008-06-11add $OpenBSD$ tag.Thordur I. Bjornsson
I hate it, art@
2008-06-10Fix buffer cache pending read statistics by ensuring we can identifyBob Beck
biowait() reads that do *not* come from the buffer cache - we use the B_RAW flag to identify these at art's suggestion - since it makes sense and the flag was not being used. this just flags all these buffers with B_RAW - biodone already ignores returned buffers marked B_RAW. ok art@