summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2014-12-03stale header: this code hasn't used hash.h in a whileTed Unangst
2014-12-02In sys_socket() and doaccept(), gotta skip setting the close-on-execPhilip Guenther
flag if the falloc() fails reported by Carlin Bingham (cb (at) viennan.net) ok deraadt@ tedu@
2014-12-01clist's chained, and could get fairly long which is why there was aTheo de Raadt
dynamic clamping mechanism. In the (new? has it already been 20 years?) world of tty ring buffers, c_cn is the maximum... There could be some ugly limit elsewhere, which may cause a deadlock (dug as deep as my patience allows), so please report any sort of new console or xterm issues that show up, such as tty lockups or high cpu utilization..
2014-11-21simple lock is long deadTed Unangst
2014-11-19panic should be reserved for unrecoverable errors, not things we merelyTed Unangst
hope don't happen. also, always check for errors. ok deraadt
2014-11-19missed a file when removing KERN_VNODE.Ted Unangst
2014-11-19delete the KERN_VNODE sysctl. it fails to provide any isolation from theTed Unangst
kernel struct vnode defintion, and the only consumer (pstat) still needs kvm to read much of the required information. no great loss to always use kvm until there's a better replacement interface. ok deraadt millert uebayasi
2014-11-18Nuke yet more obvious #include duplications.Kenneth R Westerback
ok miod@
2014-11-18Disable the page zeroing thread on MULTIPROCESSOR mips64 kernels as well.Miod Vallat
Regression spotted by tobiasu@. XXX I wonder if the page zeroing thread shouldn't perform explicit XXX pmap_update(pmap_kernel()) calls after each page zeroing... but that XXX might not be enough.
2014-11-18unifdef SETUIDSCRIPT and FDSCRIPT. we always use them. ok deraadtTed Unangst
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-11-18include unistd.h instead of picking it up accidentally. noted by jsgTed Unangst
2014-11-16Delete a comment that was obsoleted by the switch to UVMPhilip Guenther
vmcmd_map_zero() just returns the result of uvm_map(), so make it a tail call
2014-11-16Replace a plethora of historical protection options with justTheo de Raadt
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
2014-11-16Rework the __thrsigdivert (aka sigwait()) handling: instead of interferingPhilip Guenther
in ptsignal(), which broke ptrace() in various circumstances, act more like sigsuspend() by updating the signal mask and picking off waited for signals when one occurs. Don't always restart when an unwaited-for-but-handled signal occurs, as that screws with both timeout calculation and cancellation. main problem noted by jmatthew@ ok tedu@
2014-11-15hoist the slowdown handling up to the pool_do_get callers. this letsDavid Gwynne
us handle the slowdown where we already give up pr_mtx and gets rid of an ugly goto. ok tedu@ who i think has more tweaks coming
2014-11-14prefer sizeof(*ptr) to sizeof(struct) for malloc and freeTed Unangst
2014-11-14move the slowdown back up. it needs to take place after the allocated pageTed Unangst
has been added to the pool, else it doesn't help because the memory isn't available. lost in locking rework. tested blambert sthen
2014-11-12take a few more ticks to actually throttle down. hopefully helps inTed Unangst
situations where e.g. web browsing is cpu intense but intermittently idle. subject to further refinement and tuning.
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