Go to the source code of this file.
|
void | sem_init (void) |
|
void | msg_init (void) |
|
void | shm_init (void) |
|
void | ipc_init_ids (struct ipc_ids *) |
|
int | ipc_addid (struct ipc_ids *, struct kern_ipc_perm *, int) |
|
int | ipc_get_maxid (struct ipc_ids *) |
|
void | ipc_rmid (struct ipc_ids *, struct kern_ipc_perm *) |
|
int | ipcperms (struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flg) |
|
void * | ipc_alloc (int size) |
|
void | ipc_free (void *ptr, int size) |
|
void * | ipc_rcu_alloc (int size) |
|
void | ipc_rcu_getref (void *ptr) |
|
void | ipc_rcu_putref (void *ptr) |
|
struct kern_ipc_perm * | ipc_lock (struct ipc_ids *, int) |
|
void | kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out) |
|
void | ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) |
|
int | ipc_update_perm (struct ipc64_perm *in, struct kern_ipc_perm *out) |
|
struct kern_ipc_perm * | ipcctl_pre_down (struct ipc_namespace *ns, struct ipc_ids *ids, int id, int cmd, struct ipc64_perm *perm, int extra_perm) |
|
void | free_msg (struct msg_msg *msg) |
|
struct msg_msg * | load_msg (const void __user *src, int len) |
|
int | store_msg (void __user *dest, struct msg_msg *msg, int len) |
|
void | recompute_msgmni (struct ipc_namespace *) |
|
struct kern_ipc_perm * | ipc_lock_check (struct ipc_ids *ids, int id) |
|
int | ipcget (struct ipc_namespace *ns, struct ipc_ids *ids, struct ipc_ops *ops, struct ipc_params *params) |
|
void | free_ipcs (struct ipc_namespace *ns, struct ipc_ids *ids, void(*free)(struct ipc_namespace *, struct kern_ipc_perm *)) |
|
#define ipc_init_proc_interface |
( |
|
path, |
|
|
|
header, |
|
|
|
ids, |
|
|
|
show |
|
) |
| do {} while (0) |
#define SEQ_MULTIPLIER (IPCMNI) |
ipc64_perm_to_ipc_perm - convert new ipc permissions to old : new style IPC permissions : old style IPC permissions
Turn the new style permissions object into a compatibility object and store it into the pointer.
Definition at line 663 of file util.c.
ipc_addid - add an IPC identifier : IPC identifier set : new IPC permission set : limit for the number of used ids
Add an entry 'new' to the IPC ids idr. The permissions object is initialised and the first free entry is set up and the id assigned is returned. The 'new' entry is returned in a locked state on success. On failure the entry is not locked and a negative err-code is returned.
Called with ipc_ids.rw_mutex held as a writer.
Definition at line 250 of file util.c.
ipc_alloc - allocate ipc space : size desired
Allocate memory from the appropriate pools and return a pointer to it. NULL is returned if the allocation fails
Definition at line 445 of file util.c.
ipc_free - free ipc space : pointer returned by ipc_alloc : size of block
Free a block created with ipc_alloc(). The caller must know the size used in the allocation call.
Definition at line 464 of file util.c.
ipc_init_ids - initialise IPC identifiers : Identifier set
Set up the sequence range to use for the ipc identifier range (limited below IPCMNI) then initialise the ids idr.
Definition at line 119 of file util.c.
ipc_lock - Lock an ipc structure without rw_mutex held : IPC identifier set : ipc id to look for
Look for an id in the ipc ids idr and lock the associated ipc object.
The ipc object is locked on exit.
Definition at line 684 of file util.c.
ipc_rcu_alloc - allocate ipc and rcu space : size desired
Allocate memory for the rcu header structure + the object. Returns the pointer to the object. NULL is returned if the allocation fails.
Definition at line 526 of file util.c.
ipc_rmid - remove an IPC identifier : IPC identifier set : ipc perm structure containing the identifier to remove
ipc_ids.rw_mutex (as a writer) and the spinlock for this ID are held before this function is called, and remain locked on the exit.
Definition at line 424 of file util.c.
ipc_update_perm - update the permissions of an IPC. : the permission given as input. : the permission of the ipc to set.
Definition at line 750 of file util.c.
ipcctl_pre_down - retrieve an ipc and check permissions for some IPC_XXX cmd : the ipc namespace : the table of ids where to look for the ipc : the id of the ipc to retrieve : the cmd to check : the permission to set : one extra permission parameter used by msq
This function does some common audit and permissions check for some IPC_XXX cmd and is called from semctl_down, shmctl_down and msgctl_down. It must be called without any lock held and
- retrieves the ipc with the given id in the given table.
- performs some audit and permission check, depending on the given cmd
- returns the ipc with both ipc and rw_mutex locks held in case of success or an err-code without any lock held otherwise.
Definition at line 782 of file util.c.
ipcget - Common sys_*get() code : namsepace : IPC identifier set : operations to be called on ipc object creation, permission checks and further checks : the parameters needed by the previous operations.
Common routine called by sys_msgget(), sys_semget() and sys_shmget().
Definition at line 736 of file util.c.
ipcperms - check IPC permissions : IPC namespace : IPC permission set : desired permission set.
Check user, group, other permissions for access to ipc resources. return 0 if allowed
will most probably be 0 or S_...UGO from <linux/stat.h>
Definition at line 607 of file util.c.
kernel_to_ipc64_perm - convert kernel ipc permissions to user : kernel permissions : new style IPC permissions
Turn the kernel object into a set of permissions descriptions for returning to userspace ().
Definition at line 643 of file util.c.
Definition at line 86 of file msg.c.