summaryrefslogtreecommitdiff
path: root/sys/uvm
AgeCommit message (Collapse)Author
2014-12-18remove two useless and unused hash penalty definesTed Unangst
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-15don't drop the kernel lock everytime. on a busy system, this results inTed Unangst
the reaper spending more than half its time in uvm_pause. we want the system to be interactive, but we want throughput too. this seems like a decent balance.
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-09Sprinkle in a little more mallocarray().Doug Hogan
ok deraadt@ tedu@
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-11-30panic if the kernel requests W | X pages; ok kettenisTheo de Raadt
2014-11-27The sti(4) driver copies its ROM into kernel memory and executes the codeMark Kettenis
in there. It explicitly changes the mapping of that memory to RX, but this only works if the maximum protection of the mapping includes PROT_EXEC. ok miod@, deraadt@
2014-11-21somebody permitted simple_locks back into uvm. they will be referred toTed Unangst
the bureau of party loyalty for reeducation.
2014-11-21Kill kv_executable flag. We no longer allow requests for PROT_EXECTheo de Raadt
mappings via this interface (nothing uses it, in any case) ok uebayasi tedu
2014-11-18Nuke yet more obvious #include duplications.Kenneth R Westerback
ok miod@
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-17More cases of kernel map entries being created as EXEC by default; notTheo de Raadt
just the base permission but the maxprot as well. ok tedu
2014-11-17There is no reason for uvm_km_alloc1() to allocate kernel memoryTheo de Raadt
that is executable. ok tedu kettenis guenther
2014-11-17instead of PROT_MASK, use PROT_READ | PROT_WRITE | PROT_EXEC toTheo de Raadt
show the maxprot available in obreak mappings. (the default remains PROT_READ | PROT_WRITE, so don't be afraid). ok tedu
2014-11-17convert a copystr to strlcpy.Ted Unangst
rearrange things in mountswap to delay malloc and always allocate needed size.
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-15repair operator precedence in UVM_MAPFLAG() macro; ok teduTheo de Raadt
2014-11-13sizes for simple frees. new diff without the bug spotted by deraadtTed Unangst
2014-11-13bzero -> memsetTed Unangst
2014-10-25Display uvmexp.zeropages in ddb's `show uvmexp' command.Miod Vallat
2014-10-03Initialize uvm_pagezero_thread()'s page list variable.Philip Guenther
ok krw@ sthen@
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-03Introduce __MAP_NOFAULT, a mmap(2) flag that makes sure a mapping will notMark Kettenis
cause a SIGSEGV or SIGBUS when a mapped file gets truncated. Access to pages that are not backed by a file on such a mapping will be replaced by zero-filled anonymous pages. Makes passing file descriptors of mapped files usable without having to play tricks with signal handlers. "steal your mmap flag" deraadt@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-09-09Make the cleaner, syncer, pagedaemon, aiodone daemons allBret Lambert
yield() if the cpu is marked SHOULDYIELD. ok miod@ tedu@ phessler@
2014-09-08Don't sleep on allocation of hash table entries. Should fix crashes peopleMark Kettenis
have been seeing with tmpfs. Based on a similar fix from Bitrig by Owain Ainsworth. ok jsg@
2014-09-07typo in commentPhilip Guenther
2014-08-14Bring back 1.173 (reverting 1.174) - mips64 systems are still unhappy whenMiod Vallat
the hint returned is over VM_MAXUSER_ADDRESS, apparently; better be safe for now while this is investigated further.
2014-08-12Revert 1.173 now that the real cause of the octeon regression has been fixed.Miod Vallat
2014-07-13Fall back to smaller spacing on the mips64 machines.Paul Irofti
Please spare some change for the mips64 memory-challenged machines.. Some change, Sir? Fixes at least the octeon platform. Found the hardway on my DSR500. Found by Boss tedu@ and Boss deraadt@ Okay Boss miod@
2014-07-13more mmap random on 64-bit platforms. noticed in freebsd aslr patches.Ted Unangst
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12Add a function to drop all clean pages on the page daemon queues and callMark Kettenis
it when we hibernate. ok mlarkin@, miod@, deraadt@
2014-07-11Chuck Cranor rescinded clauses in his licenseJonathan Gray
on the 2nd of February 2011 in NetBSD. http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2 http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2 http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2 http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2 http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2 http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2 http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2 http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-07-08white space repairsTheo de Raadt
2014-07-08rearrange some includes. also, pull in uvm/uvm.h because soon sysctl.hTheo de Raadt
won't be pulling in the uvm side of the kitchen.
2014-07-08the #ifdef _KERNEL can wrap the entire file. uvm_extern.h only pullsTheo de Raadt
this inside #ifdef _KERNEL in any case, so nothing really changes.
2014-07-08subtle rearrangement of includesTheo de Raadt
2014-07-08bye bye UBC; ok beck dlgTheo de Raadt
2014-07-03It is important that we don't release the kernel lock between issuing aMark Kettenis
wakeup and clearing the PG_BUSY and PG_WANTED flags, so try to keep those bits as close together and defenitely avoid calling random code in between. ok guenther@, tedu@
2014-07-02Use real parameter types for u{dv,vn}_attach() instead of void *Matthew Dempsky
ok guenther
2014-06-29delete a #ifdef _KERNEL chunk protecting userland from an #if 0 chunkTheo de Raadt
2014-06-27Cleanup support for legacy mmap flagsMatthew Dempsky
Move all legacy MAP_FOO values behind #ifndef _KERNEL and redefine them to either be aliases for existing flags (e.g., MAP_COPY -> MAP_PRIVATE) or 0. Also, add MAP_OLDFOO defines (behind #ifndef _KERNEL) so the kernel and kdump can remain compatible with current OpenBSD binaries. ok deraadt
2014-06-21Make sure kmthread never loops without making progress: if the freelistPhilip Guenther
was empty then the first page allocation should sleep until it can get one. ok tedu@
2014-06-13Add support for MAP_INHERIT_ZERO.Matthew Dempsky
This provides a way for a process to designate pages in its address space that should be replaced by fresh, zero-initialized anonymous memory in forked child processes, rather than being copied or shared. ok jmc, kettenis, tedu, deraadt; positive feedback from many more
2014-06-10KNFMark Kettenis