Lines Matching refs:ipc

3  * linux/ipc/util.c

10 * Nov 1999 - ipc helper functions, unified SMP locking
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
80 * ipc_init - initialise ipc subsystem
82 * The various sysv ipc resources (semaphores, messages and shared
108 * ipc_init_ids - initialise ipc identifiers
109 * @ids: ipc identifier set
111 * Set up the sequence range to use for the ipc identifier range (limited
134 * @ids: ipc id table to iterate.
162 * ipc_findkey - find a key in an ipc identifier set
163 * @ids: ipc identifier set
166 * Returns the locked pointer to the ipc structure if found or NULL
167 * otherwise. If key is found ipc points to the owning ipc structure
213 * and the lockless preparations for ipc operations can start.
262 * ipc_addid - add an ipc identifier
263 * @ids: ipc identifier set
264 * @new: new ipc permission set
267 * 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.
383 * ipcget_public - get an ipc object or create a new one
384 * @ns: ipc namespace
385 * @ids: ipc identifier set
394 * On success, the ipc id is returned.
417 /* ipc object has been locked by ipc_findkey() */
442 * ipc_kht_remove - remove an ipc from the key hashtable
443 * @ids: ipc identifier set
444 * @ipcp: ipc perm structure containing the key to remove
457 * ipc_rmid - remove an ipc identifier
458 * @ids: ipc identifier set
459 * @ipcp: ipc perm structure containing the identifier to remove
485 * ipc_set_key_private - switch the key of an existing ipc to IPC_PRIVATE
486 * @ids: ipc identifier set
487 * @ipcp: ipc perm structure containing the key to modify
513 * ipcperms - check ipc permissions
514 * @ns: ipc namespace
515 * @ipcp: ipc permission set
519 * to ipc resources. return 0 if allowed
550 * kernel_to_ipc64_perm - convert kernel ipc permissions to user
552 * @out: new style ipc permissions
569 * ipc64_perm_to_ipc_perm - convert new ipc permissions to old
570 * @in: new style ipc permissions
571 * @out: old style ipc permissions
589 * @ids: ipc identifier set
590 * @id: ipc id to look for
592 * Look for an id in the ipc ids idr and return associated ipc object.
595 * The ipc object is *not* locked on exit.
612 * @ids: ipc identifier set
613 * @id: ipc id to look for
615 * Similar to ipc_obtain_object_idr() but also checks the ipc object
619 * The ipc object is *not* locked on exit.
639 * @ids: ipc identifier set
640 * @ops: operations to be called on ipc object creation, permission checks
656 * ipc_update_perm - update the permissions of an ipc object
658 * @out: the permission of the ipc to set.
676 * ipcctl_obtain_check - retrieve an ipc object and check permissions
677 * @ns: ipc namespace
678 * @ids: the table of ids where to look for the ipc
679 * @id: the id of the ipc to retrieve
688 * - retrieves the ipc object with the given id in the given table.
690 * - returns a pointer to the ipc object or otherwise, the corresponding
724 * ipc_parse_version - ipc call version
757 * This routine locks the ipc structure found at least at position pos.
761 struct kern_ipc_perm *ipc;
766 ipc = idr_find(&ids->ipcs_idr, id);
767 if (ipc != NULL) {
772 ipc = NULL;
778 ipc = idr_find(&ids->ipcs_idr, pos);
779 if (ipc != NULL) {
781 ipc_lock_object(ipc);
787 return ipc;
794 struct kern_ipc_perm *ipc = it;
796 /* If we had an ipc id locked before, unlock it */
797 if (ipc && ipc != SEQ_START_TOKEN) {
798 ipc_unlock(ipc);
805 * File positions: pos 0 -> header, pos n -> ipc id = n - 1.
806 * SeqFile iterator: iterator value locked ipc pointer or SEQ_TOKEN_START.
832 /* Find the (pos-1)th ipc */
838 struct kern_ipc_perm *ipc = it;
844 if (ipc && ipc != SEQ_START_TOKEN) {
845 ipc_unlock(ipc);