Lines Matching full:ipc

3  * linux/ipc/util.c
8 * Occurs in several places in the IPC code.
10 * Nov 1999 - ipc helper functions, unified SMP locking
12 * Oct 2002 - One lock per IPC id. RCU ipc_free for lock-free grow_ary().
14 * Mar 2006 - support for audit of ipc object properties
20 * General sysv ipc locking scheme:
22 * obtain the ipc object (kern_ipc_perm) by looking up the id in an idr
28 * acquire the ipc lock (kern_ipc_perm.lock) through
35 * drop the ipc lock, through ipc_unlock_object().
39 * - creating, removing and iterating the existing entries in ipc
81 * ipc_init - initialise ipc subsystem
83 * The various sysv ipc resources (semaphores, messages and shared
109 * ipc_init_ids - initialise ipc identifiers
110 * @ids: ipc identifier set
112 * Set up the sequence range to use for the ipc identifier range (limited
135 * @ids: ipc id table to iterate.
163 * ipc_findkey - find a key in an ipc identifier set
164 * @ids: ipc identifier set
167 * Returns the locked pointer to the ipc structure if found or NULL
168 * otherwise. If key is found ipc points to the owning ipc structure
187 * Insert new IPC object into idr tree, and set sequence number and id
214 * and the lockless preparations for ipc operations can start. in ipc_idr_alloc()
264 * ipc_addid - add an ipc identifier
265 * @ids: ipc identifier set
266 * @new: new ipc permission set
269 * Add an entry 'new' to the ipc ids idr. The permissions object is
330 * ipcget_new - create a new ipc object
331 * @ns: ipc namespace
332 * @ids: ipc identifier set
351 * ipc_check_perms - check security and permissions for an ipc object
352 * @ns: ipc namespace
353 * @ipcp: ipc permission set
361 * On success, the ipc id is returned.
384 * ipcget_public - get an ipc object or create a new one
385 * @ns: ipc namespace
386 * @ids: ipc identifier set
395 * On success, the ipc id is returned.
417 /* ipc object has been locked by ipc_findkey() */ in ipcget_public()
427 * ipc_check_perms returns the IPC id on in ipcget_public()
440 * ipc_kht_remove - remove an ipc from the key hashtable
441 * @ids: ipc identifier set
442 * @ipcp: ipc perm structure containing the key to remove
456 * @ids: ipc identifier set
461 * Updating ids->max_idx is necessary when the current highest index ipc
463 * If no ipc object is allocated, then -1 is returned.
490 * ipc_rmid - remove an ipc identifier
491 * @ids: ipc identifier set
492 * @ipcp: ipc perm structure containing the identifier to remove
515 * ipc_set_key_private - switch the key of an existing ipc to IPC_PRIVATE
516 * @ids: ipc identifier set
517 * @ipcp: ipc perm structure containing the key to modify
543 * ipcperms - check ipc permissions
544 * @ns: ipc namespace
545 * @ipcp: ipc permission set
549 * to ipc resources. return 0 if allowed
580 * kernel_to_ipc64_perm - convert kernel ipc permissions to user
582 * @out: new style ipc permissions
599 * ipc64_perm_to_ipc_perm - convert new ipc permissions to old
600 * @in: new style ipc permissions
601 * @out: old style ipc permissions
619 * @ids: ipc identifier set
620 * @id: ipc id to look for
622 * Look for an id in the ipc ids idr and return associated ipc object.
625 * The ipc object is *not* locked on exit.
641 * @ids: ipc identifier set
642 * @id: ipc id to look for
644 * Similar to ipc_obtain_object_idr() but also checks the ipc object
648 * The ipc object is *not* locked on exit.
666 * @ids: ipc identifier set
667 * @ops: operations to be called on ipc object creation, permission checks
683 * ipc_update_perm - update the permissions of an ipc object
685 * @out: the permission of the ipc to set.
703 * ipcctl_obtain_check - retrieve an ipc object and check permissions
704 * @ns: ipc namespace
705 * @ids: the table of ids where to look for the ipc
706 * @id: the id of the ipc to retrieve
715 * - retrieves the ipc object with the given id in the given table.
717 * - returns a pointer to the ipc object or otherwise, the corresponding
753 * ipc_parse_version - ipc call version
756 * Return IPC_64 for new style IPC and IPC_OLD for old style IPC.
786 * sysvipc_find_ipc - Find and lock the ipc structure based on seq pos
787 * @ids: ipc identifier set
790 * The function finds an ipc structure, based on the sequence file
791 * position @pos. If there is no ipc structure at position @pos, then
795 * the found ipc structure.
798 * The function returns the found ipc structure, or NULL at EOF.
803 struct kern_ipc_perm *ipc; in sysvipc_find_ipc() local
808 ipc = idr_get_next(&ids->ipcs_idr, &tmpidx); in sysvipc_find_ipc()
809 if (ipc != NULL) { in sysvipc_find_ipc()
811 ipc_lock_object(ipc); in sysvipc_find_ipc()
816 return ipc; in sysvipc_find_ipc()
823 struct kern_ipc_perm *ipc = it; in sysvipc_proc_next() local
825 /* If we had an ipc id locked before, unlock it */ in sysvipc_proc_next()
826 if (ipc && ipc != SEQ_START_TOKEN) in sysvipc_proc_next()
827 ipc_unlock(ipc); in sysvipc_proc_next()
835 * File positions: pos 0 -> header, pos n -> ipc idx = n - 1.
836 * SeqFile iterator: iterator value locked ipc pointer or SEQ_TOKEN_START.
860 /* Otherwise return the correct ipc structure */ in sysvipc_proc_start()
866 struct kern_ipc_perm *ipc = it; in sysvipc_proc_stop() local
872 if (ipc && ipc != SEQ_START_TOKEN) in sysvipc_proc_stop()
873 ipc_unlock(ipc); in sysvipc_proc_stop()