summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2014-12-19start retiring the nointr allocator. specify PR_WAITOK as a flag as aTed Unangst
marker for which pools are not interrupt safe. ok dlg
2014-12-19timestamp empty pages, and only free them if theyve been idle for at leastDavid Gwynne
a second. this basically brings back the functionality that was trimmed in r1.53, except this version uses ticks instead of very slow hardware clock reads. ok tedu@
2014-12-19the last commit changed LIST_INSERT_HEAD to TAILQ_INSERT_TAIL cos theDavid Gwynne
latter is cheaper, but i forgot to change the thing that pulls pages off those lists to match the change in direction. the page lists went from LIFO to FIFO. this changes pool_update_curpage to use TAILQ_LAST so we go back to LIFO. pointed out by and ok tedu@
2014-12-19replace the page LISTS with page TAILQs. this will let me pull pages fromDavid Gwynne
either end of the lists cheaply. ok kettenis@ tedu@
2014-12-17remove lock.h from uvm_extern.h. another holdover from the simpletonlockTed Unangst
era. fix uvm including c files to include lock.h or atomic.h as necessary. ok deraadt
2014-12-17Prefer MADV_* over POSIX_MADV_* in kernel for consistency: the latterPhilip Guenther
doesn't have all the values and therefore can't be used everywhere. ok deraadt@ kettenis@
2014-12-16primary change: move uvm_vnode out of vnode, keeping only a pointer.Ted Unangst
objective: vnode.h doesn't include uvm_extern.h anymore. followup changes: include uvm_extern.h or lock.h where necessary. ok and help from deraadt
2014-12-15Use MAP_INHERIT_* for the 'inh' argument to the UMV_MAPFLAG() macro,Philip Guenther
eliminating the must-be-kept-in-sync UVM_INH_* macros ok deraadt@ tedu@
2014-12-13yet more mallocarray() changes.Doug Hogan
ok tedu@ deraadt@
2014-12-12sysctl kern.global_ptrace.Ted Unangst
controls whether you can ptrace any process with appropriate privileges or only one own's children. ok deraadt
2014-12-12sysctl_proc_vmmap(): Allow retrieving "self" VM mapping without privilege.Masao Uebayashi
Previous version OK'ed by tedu@ deraadt@
2014-12-11convert bcopy to memcpy/memmove. ok krwTed Unangst
2014-12-11typos; from kaspars bankovskisJason McIntyre
2014-12-10retire shutdown hooks; ok deraadt, krwMike Belopuhov
2014-12-10Convert watchdog(4) devices to use autoconf(9) framework.Mike Belopuhov
ok deraadt, tests on glxpcib and ok mpi
2014-12-10convert bcopy to memcpy. ok millertTed Unangst
2014-12-09More malloc() -> mallocarray() in the kernel.Doug Hogan
ok deraadt@ tedu@
2014-12-08regenPhilip Guenther
2014-12-08Add chflagsat(), modeled on fchmodat() with name to match FreeBSD.Philip Guenther
2014-12-07typo; fix from Kaspars BankovskisTheo de Raadt
2014-12-05Allow only root to use KERN_PROC_VMMAP until it is really proven safe.Masao Uebayashi
OK deraadt@
2014-12-05Introduce a new sysctl to retrieve VM map entriesMasao Uebayashi
This adds a new sysctl KERN_PROC_VMMAP, which returns an array of VM map entries of a specified process. This prevents debuggers from iterating vm_map_entry RB tree via kvm(3). The name KERN_PROC_VMMAP and struct kinfo_vmentry are chosen from the same function in FreeBSD. struct kinfo_vmentry is revised to reduce size, because OpenBSD does not keep track of filepaths. The semantic is also changed to return max buffer size as a hint, and start iteration at the specified base address. Much valuable input from deraadt@, guenther@, tedu@ OK tedu@ deraadt@
2014-12-04init the mutex used in sleeping pool_gets with the right ipl if theDavid Gwynne
pool hasnt had pool_setipl called. ok kettenis@ ages ago
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