summaryrefslogtreecommitdiffstats
path: root/sys/kern/sysv_shm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New vmmap implementation.ariane2012-03-091-5/+3
| | | | | | | | | | | | no oks (it is really a pain to review properly) extensively tested, I'm confident it'll be stable 'now is the time' from several icb inhabitants Diff provides: - ability to specify different allocators for different regions/maps - a simpler implementation of the current allocator - currently in compatibility mode: it will generate similar addresses as the old allocator
* Allow segments to be used even after they were marked for deletion withrobert2011-10-271-8/+3
| | | | | | | | | | | | the IPC_RMID flag. This is permitted as an extension beyond the standards and this is similar to what other operating systems like linux do. Because compat_linux(8) was emulating this already, remove that code since now this is the default. input from oga@, guenther@, jmc@, deraadt@ ok deraadt@
* Backout vmmap in order to repair virtual address selection algorithmsariane2011-06-061-1/+4
| | | | outside the tree.
* Reimplement uvm/uvm_map.ariane2011-05-241-4/+1
| | | | | | | | | | | | | vmmap is designed to perform address space randomized allocations, without letting fragmentation of the address space go through the roof. Some highlights: - kernel address space randomization - proper implementation of guardpages - roughly 10% system time reduction during kernel build Tested by alot of people on tech@ and developers. Theo's machines are still happy.
* explicitly specify flags to malloc and pool_get instead of relying on 0.tedu2010-07-031-2/+3
| | | | | This is more clear, and as thib pointed out, the default in softraid was wrong. ok thib.
* msgctl(), shmctl(), semctl() all have operations that are supposedguenther2009-06-021-3/+3
| | | | | | | to return pids, not thread ids, so record the former when performing operations. ok blambert
* replace ctob and btoc with ptoa and atop respectivelymartin2007-09-151-7/+7
| | | | help and ok miod@ thib@
* Use M_ZERO in a few more places to shave bytes from the kernel.art2007-09-071-11/+6
| | | | eyeballed and ok dlg@
* adapt from netbsd:sturm2007-05-291-13/+11
| | | | | | | | | | | fold sys_shmat1() back into sys_shmat(), instead add flag for shmget(2) to specify that later shmat(2) for the shared memory segment should succeed even if the segment would be marked removed; use this to implement the Linux-compatible semantics of shmat(2) this fixes current opera with shm ok millert
* Rename structs oipc_perm, omsqid_ds, osemid_ds, oshmid_ds to ipc_perm23,millert2004-07-151-16/+1
| | | | | etc to avoid confusion and for consistency with the *35 ones. Remove *n2o functions that don't belong outside of compat.
* Move the guts of the {sem,msg,shm}ctl system calls into a new functionmillert2004-07-141-11/+18
| | | | | | | which also takes two function pointers for copyin/copyout. For the real syscalls these are just the normal copyin/copyout functions. For the compat routines, these are funtions that convert between the new and old foo_ds structs automagically. OK deraadt@
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-5/+5
| | | | | | | | things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
* POSIX says the length parameter for semop(2) and shmget(2) should be size_t.millert2004-05-031-3/+4
| | | | | Create new syscalls with the correct parameters and add compat versions for the old ones under COMPAT_35.
* not a pasto. ok millert@tedu2004-04-161-2/+4
|
* Correct a reference counting bug in shmat(2); adapted from FreeBSD.millert2004-02-051-2/+4
| | | | OK deraadt@ tedu@ dhartmei@
* Remove duplicated code (pasto)millert2003-12-221-3/+1
|
* Linux shmat allows lookup of segments that are marked as removed somillert2003-10-121-2/+8
| | | | our Linux compat should too. From marius aamodt eriksen
* sys/types.h is not really needed with sys/param.h; ok mickey@kevlo2003-08-211-2/+1
|
* Sync with share/misc/license.template and add missing DARPA creditmillert2003-06-171-8/+12
| | | | where applicable.
* Use an ISC-tyle license for all my code; it is simpler and more permissive.millert2003-06-031-22/+11
|
* Nuke a whole bunch of commons; ok tedu (still more to come *sigh*)jason2003-05-121-2/+2
|
* There are two related changes.art2003-04-141-3/+2
| | | | | | | | | | | | The first one is an mquery(2) syscall. It's for asking the VM system about where to map things. It will be used by ld.so, read the man page for details. The second change is related and is a centralization of uvm_map hint that all callers of uvm_map calculated. This will allow us to adjust this hint on architectures that have segments for non-exec mappings. deraadt@ drahn@ ok.
* xerxes [/home/src/local/millert/sudo/sudo-1.6.7] % vi /usr/src/local/TiVo/Linux/Don't allow s{e,h}mmni to be set > 0xffff via sysctl since that couldmillert2003-01-071-3/+3
| | | | | cause id collisions (the macros in <sys/ipc.h> limit the index to 0xffff). Prompted by a conversation with weingart@
* Add a "findremoved" arg to shm_find_segment_by_shmid() similar tomillert2003-01-061-8/+8
| | | | | NetBSD and allow shmctl() to operate on shm segments that have been marked for removal like other OSes do.
* Add my copyright notice.millert2002-12-171-1/+27
|
* Make SysV-style shared memory and semaphore limits sysctl'able.millert2002-12-171-179/+264
| | | | | | | | | | | | Instead of allocating a static amount of memory for the data structures via valloc() in allocsys(), allocate things dynamically using pool(9) when possible and malloc(9) when not. The various members of struct seminfo and struct shminfo are in kern.seminfo and kern.shminfo respectively (not all members of kern.seminfo are changable). The data structures used still leave something to be desired but things are not made worse in that respect by this commit.
* Eliminate the use of KERN_SUCCESS outside of uvm/art2002-11-061-6/+4
| | | | | | | | Also uvm_map returns KERN_* codes that are directly mapped to errnos, so we can return them instead of doing some attempt to translation. drahn@ "I see no problem" pval@ "makes sense"
* Since memory deallocation can't fail, remove the error return fromart2002-10-291-5/+3
| | | | | uvm_unmap, uvm_deallocate and a few other functions. Simplifies some code and reduces diff to the UBC branch.
* minor formatting.art2002-07-161-2/+2
|
* Fix vm -> uvm in a comment.art2002-07-121-2/+2
|
* First round of __P removal in sysmillert2002-03-141-9/+9
|
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-6/+9
| | | | | | | | | machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
* Sync in more uvm changes from NetBSD.art2001-11-281-9/+6
| | | | | This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
* Add an alignment argument to uvm_map that specifies an alignment hintart2001-11-071-2/+2
| | | | for the virtual address.
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+1
| | | | (Look ma, I might have broken the tree)
* Don't allocate globals in include files, use extern declarations.millert2001-08-121-1/+4
| | | | | Move the actual variables into their respective .c files. As a bonus, remove semmap which is not used.
* remove old vmart2001-06-271-65/+2
|
* KNFderaadt2001-06-221-12/+10
|
* Create COMPAT_25 and move ogetfsstat, ostatfs and ostatfs into it.millert2001-05-161-75/+13
| | | | Create COMPAT_23 and move __osemctl, omsgctl, oshmctl there.
* Remove the (vaddr_t) casts inside the round_page and trunc_page macros.art2001-05-051-2/+3
| | | | | | We might want to use them on types that are bigger than vaddr_t. Fix all callers that pass pointers without casts.
* Get rid of CLSIZE and all related stuff.art2001-05-051-5/+5
| | | | | | | | | CLSIZE -> 1 CLBYTES -> PAGE_SIZE OLOFSET -> PAGE_MASK etc. At the same time some archs needed some cleaning in vmparam.h so that goes in at the same time.
* Use PAGE_SIZE instead of NBPG.art1999-11-251-2/+2
|
* Non UVM vaddr_t/paddr_t fixupweingart1999-07-081-6/+1
|
* Improved sysv shared memory. Works with UVM.art1999-06-231-133/+201
| | | | | Original work done in FreeBSD, but this code was ported from NetBSD by Chuck Cranor.
* We don't need a second prototype for shmexitart1999-02-221-2/+1
|
* don't include vm_map.h twiceart1999-02-071-2/+1
|
* fix compat shmctl/IPC_STATmatthieu1998-06-141-2/+2
|
* change ipc.h to use uid_t and friends, and then build compat system calls for the old ushort based ipc.hderaadt1998-06-111-1/+78
|
* const a few more callsderaadt1998-05-111-3/+3
|
* shmdt before shmdt (in child) fixderaadt1997-02-211-1/+8
|