summaryrefslogtreecommitdiff
path: root/sys/kern/sysv_ipc.c
Commit message (Collapse)AuthorAgeFilesLines
* It is possible for an active aio to prevent shared memory from beingMatthew Dillon2003-01-131-4/+3
| | | | | | | | | | | | | | | | dereferenced when a process exits due to the vmspace ref-count being bumped. Change shmexit() and shmexit_myhook() to take a vmspace instead of a process and call it in vmspace_dofree(). This way if it is missed in exit1()'s early-resource-free it will still be caught when the zombie is reaped. Also fix a potential race in shmexit_myhook() by NULLing out vmspace->vm_shm prior to calling shm_delete_mapping() and free(). MFC after: 7 days Notes: svn path=/head/; revision=109205
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-2/+2
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredJohn Baldwin2002-02-271-1/+1
| | | | | | | reference. Notes: svn path=/head/; revision=91406
* Eliminate semexit_hook using at_exit(9) and rm_at_exit(9).Alan Cox2001-12-301-12/+0
| | | | | | | Reviewed by: alfred Notes: svn path=/head/; revision=88715
* o Remove (struct proc *p = td->td_proc) indirection in ipcperm(),Robert Watson2001-11-021-5/+3
| | | | | | | | | | | | as suser_td(td) works as well as suser_xxx(NULL, p->p_ucred, 0); This simplifies upcoming changes to suser(), and causes this code to use the right credential (well, largely) once the td->td_ucred changes are complete. There remains some redundancy and oddness in this code, which should be rethought after the next batch of suser and credential changes. Notes: svn path=/head/; revision=85904
* o Move suser() calls in kern/ to using suser_xxx() with an explicitRobert Watson2001-11-011-2/+4
| | | | | | | | | | | | credential selection, rather than reference via a thread or process pointer. This is part of a gradual migration to suser() accepting a struct ucred instead of a struct proc, simplifying the reference and locking semantics of suser(). Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=85844
* KSE Milestone 2Julian Elischer2001-09-121-2/+3
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* sysvipc loadable.Alfred Perlstein2000-12-011-204/+38
| | | | | | | | | new syscall entry lkmressys - "reserved loadable syscall" Make syscall_register allow overwriting of such entries (lkmressys). Notes: svn path=/head/; revision=69449
* Move suser() and suser_xxx() prototypes and a related #define fromPoul-Henning Kamp2000-10-291-0/+1
| | | | | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>. Notes: svn path=/head/; revision=67893
* Remove the undocumented, flawed, broken-as-designed semconfig() syscall.Peter Wemm2000-05-011-9/+0
| | | | Notes: svn path=/head/; revision=59828
* In 'ipcperm()', only call 'suser()' if it is actually required.Brian S. Dean2000-03-131-7/+2
| | | | | | | | | | | | Previously, it was being called whether it was needed or not and the ASU flag was being set (as a side affect of calling 'suser()') in cases where superuser privileges were not actually needed. This was all pointed out to me by Bruce Evans. Reviewed by: bde Notes: svn path=/head/; revision=58026
* Fix a superuser credential check.Brian S. Dean2000-02-291-1/+3
| | | | | | | | Reviewed by: phk Approved by: jkh Notes: svn path=/head/; revision=57635
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Change suser_xxx() to suser() where it applies.Poul-Henning Kamp1999-04-271-7/+6
| | | | Notes: svn path=/head/; revision=46116
* Suser() simplification:Poul-Henning Kamp1999-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. Notes: svn path=/head/; revision=46112
* Use suser() to determine super-user-ness, don't examine cr_uid directly.Poul-Henning Kamp1999-01-301-2/+5
| | | | Notes: svn path=/head/; revision=43426
* Removed an unused #include. Added an unsed #include of <sys/ucred.h>Bruce Evans1997-11-181-8/+9
| | | | | | | | to prepare for not including it in <sys/param.h>. Moved conditionally used #includes inside an ifdef. Notes: svn path=/head/; revision=31261
* Move the "retval" (3rd) parameter from all syscall functions and putPoul-Henning Kamp1997-11-061-46/+31
| | | | | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled. Notes: svn path=/head/; revision=30994
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* kern_descrip.c: add fdshare()/fdcopy()Peter Wemm1996-02-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | kern_fork.c: add the tiny bit of code for rfork operation. kern/sysv_*: shmfork() takes one less arg, it was never used. sys/shm.h: drop "isvfork" arg from shmfork() prototype sys/param.h: declare rfork args.. (this is where OpenBSD put it..) sys/filedesc.h: protos for fdshare/fdcopy. vm/vm_mmap.c: add minherit code, add rounding to mmap() type args where it makes sense. vm/*: drop unused isvfork arg. Note: this rfork() implementation copies the address space mappings, it does not connect the mappings together. ie: once the two processes have split, the pages may be shared, but the address space is not. If one does a mmap() etc, it does not appear in the other. This makes it not useful for pthreads, but it is useful in it's own right for having light-weight threads in a static shared address space. Obtained from: Original by Ron Minnich, extended by OpenBSD Notes: svn path=/head/; revision=14221
* (gulp!) reran makesyscalls..Peter Wemm1996-01-081-2/+229
| | | | | | | | | | sysv_ipc.c: add stub functions that either simply return (for the hooks in kern_fork/kern_exit) or log() a messgae and call enosys() (for the syscalls). sysv_ipc.c will become "standard" in conf/files and has #ifs for all the permutations. Notes: svn path=/head/; revision=13332
* Somehow managed to miss these four files when converting the SYSV IPCGarrett Wollman1996-01-051-1/+3
| | | | | | | options over to the new style. Notes: svn path=/head/; revision=13255
* Added SYSV ipcs.Doug Rabson1994-09-131-0/+69
Obtained from: NetBSD and FreeBSD-1.1.5 Notes: svn path=/head/; revision=2729