summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2014-11-10Grab the pool mutex in sysctl_dopool(), but only for pools for whichMark Kettenis
pool_setipl(9) has been called. This avoids the panic introduced in rev 1.139 (which was subsequently backed out) while still effectively guaranteeing a consistent snapshot. Pools used from interrupt handlers should use the appropriate pool IPL. ok dlg@, deraadt@
2014-11-08some systems install sensors where numbering introduces a gap whichJasper Lievisse Adriaanse
falsely triggered the added panic. revert the panic for now while a better solution is being worked on as reported by Bjorn Ketelaars on misc@ via jsing@
2014-11-06printf debugging worked! figured out the bug (in free()) just afterTed Unangst
committing the printfs. revert.
2014-11-06need to calculate correct size before doing the free checks. the biggestTed Unangst
malloc bucket isn't precise, it can have anything in it. should fix recent panics. sorry for inconvenience. ok deraadt millert
2014-11-06Make better use of the value of psectionslen instead of recomputingTodd C. Miller
it multiple times. Also remove an unused variable. OK deraadt@ tedu@
2014-11-06resort to printf debugging hints until we can figure this out. ok deraadtTed Unangst
2014-11-06let ramdisks compileTheo de Raadt
2014-11-05need to move lock up to prevent more than one malloc. ok guentherTed Unangst
2014-11-05don't use loop variable (i) for not loop things. use a new var.Ted Unangst
2014-11-05use memname to print string of type. stolen from deraadtTed Unangst
2014-11-05also print type when free size is wrongTed Unangst
2014-11-05No reason to have things like the hibernate allocation area and chunkMike Larkin
ordering regions mapped executable, so remove those permissions. ok deraadt@
2014-11-05change the mbuf pool wait channel name from mbpl to mbufpl. "mb"David Gwynne
isnt descriptive enough for me. ok deraadt@
2014-11-04panic when a sensordev gets installed twice, instead of blowing up amazinglyJasper Lievisse Adriaanse
later on ok deraadt@
2014-11-03include sys/unistd.h where needed instead of indirect reliance. ok jsgTed Unangst
2014-11-03correct test logic. ok guentherTed Unangst
2014-11-03Put the socket splicing fields into a seperate struct sosplice thatAlexander Bluhm
gets only allocated when needed. This way struct socket shrinks from 472 to 392 bytes on amd64. When splicing gets active, another 88 bytes are allocated for struct sosplice. OK dlg@
2014-11-03deobfuscate by pulling le conversions up. use mallocarray.Ted Unangst
2014-11-03pass size argument to free()Theo de Raadt
ok doug tedu
2014-11-02Unmap the hibernate hiballoc page after we are done with it.Mike Larkin
ok deraadt, kettenis
2014-11-02tweak free panic messages tooTed Unangst
2014-11-02tweak panic messages for consistencyTed Unangst
2014-11-01add a few sizes to freeTed Unangst
2014-11-01remove color support. discussed with dlg and mikebTed Unangst
2014-10-26Now that threads hold their own reference to their ucreds, sys_ktrace()Philip Guenther
doesn't need to hold an extra reference during the call ok deraadt@ millert@
2014-10-25Do not launch the page zeroing thread on MULTIPROCESSOR m88k systems. ThisMiod Vallat
causes a deadlock between reaper and zerothread I am currently investigating.
2014-10-22Extend domknodat() to support S_IFIFO directly and remove domkfifoat().Todd C. Miller
Both sys_mkfifo(2) and sys_mkfifoat(2) could be replace by libc wrappers using mknodat(2) at a later date if we desire. OK guenther@
2014-10-22Remove some unused/unneeded code.Mike Larkin
2014-10-22Use the global piglet address variables as sparingly as possible to avoidMike Larkin
redundant copies of the same information. No functional change. Also add some comments as to how these globals are used.
2014-10-18Don't assume that ep_taddr and ep_daddr are page-aligned. It is possible toMark Kettenis
construct ELF executables for which ep_daddr ends up not being properly aligned. Sanitize the addresses before setting up the address space for the new executable. Should fix the panic discovered by Alejandro Hernandez. ok miod@
2014-10-17cpu_setperf and perflevel must remain exposed, otherwise a bunch ofTheo de Raadt
MD code needs excess #ifndef SMALL_KERNEL
2014-10-17redo the performance throttling in the kernel.Ted Unangst
introduce a new sysctl, hw.perfpolicy, that governs the policy. when set to anything other than manual, hw.setperf then becomes read only. phessler was heading in this direction, but this is slightly different. :)
2014-10-16No need to reserve separate KVA ranges for the RLE and copy pages inMike Larkin
hibernate anymore.
2014-10-13disable pagezero thread on hppa, until failure gets diagnosed, ok miod kettenisTheo de Raadt
2014-10-13POSIX says that mknod(2) should support fifos. OK guenther@Todd C. Miller
2014-10-13use mallocarray to get the array of pollfd structs.David Gwynne
tweaks and ok millert@ deraadt@
2014-10-13take the pool_item pi_magic touching out from under #ifdef DIAGNOSTIC.David Gwynne
i couldnt measure a significant performance difference with or without it. this is likely a function of the memory involved being close to bits that are already being touched, the implemention being simple macros that mean registers can stay hot, and a lack of conditionals that would cause a cpu pipeline to crash. this means we're unconditionally poisoning the first two u_longs of pool items on all kernels. i think it also makes the code easier to read. discussed with deraadt@
2014-10-11back out; does not even compileTheo de Raadt
2014-10-11resurrect a many year old diff. move CPU throttling into the kernel,Ted Unangst
enabled by setting hw.setperf=-1. some other bugs preventing this from going in before have been fixed. my thanks to phessler for keeping the diff alive in the mean time. tested by several to not regress.
2014-10-10massage the pool item header and pool item magic words.David Gwynne
previously they were ints, but this bumps them to long sized words. in the pool item headers they were followed by the XSIMPLEQ entries, which are basically pointers which got long word alignment. this meant there was a 4 byte gap on 64bit architectures between the magic and list entry that wasnt being poisoned or checked. this change also uses the header magic (which is sourced from arc4random) with an xor of the item address to poison the item magic value. this is inspired by tedu's XSIMPLEQ lists, and means we'll be exercising memory with more bit patterns. lastly, this takes more care around the handling of the pool_debug flag. pool pages read it when theyre created and stash a local copy of it. from then on all items returned to the page will be poisoned based on the pages local copy of the flag. items allocated off the page will be checked for valid poisoning only if both the page and pool_debug flags are both set. this avoids a race where pool_debug was not set when an item is freed (so it wouldnt get poisoned), then gets set, then an item gets allocated and fails the poison checks because pool_debug wasnt set when it was freed.
2014-10-09remove lkm filesTed Unangst
2014-10-09remove LKM supportTed Unangst
2014-10-09regenTed Unangst
2014-10-09delete LKM syscall stubsTed Unangst
2014-10-09fix some data type mismatches in the zlib paths in hibernateMike Larkin
2014-10-09remove an unused function and some unused variables in hibernateMike Larkin
2014-10-08make workq/taskq runner threads yield when they've hogged the cpuBret Lambert
ok deraadt@ dlg@ phessler@
2014-10-08Now that the cleaner yields the cpu, we can stop checkingBret Lambert
to see if we've hogged the cpu for >1 second. okay miod@
2014-10-03Introduce a thread for zeroing pages without holding the kernel lock. ThisMark Kettenis
way we can do some useful kernel lock in parallel with other things and create a reservoir of zeroed pages ready for use elsewhere. This should reduce latency. The thread runs at the absolutel lowest priority such that we don't keep other kernel threads or userland from doing useful work. Can be easily disabled by disabling the kthread_create(9) call in main(). Which perhaps we should do for non-MP kernels. ok deraadt@, tedu@
2014-10-03if you're adding the first cluster reference, you dont have toDavid Gwynne
coordinate with other mbufs so you can add all the pointers without taking the extref lock. looks good deraadt@