Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\util.c Create Date:2022-07-28 16:40:01
Last Modify:2022-05-23 18:05:07 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pcctl_obtain_check - retrieve an ipc object and check permissions*@ns: ipc namespace*@ids: the table of ids where to look for the ipc*@id: the id of the ipc to retrieve*@cmd: the cmd to check*@perm: the permission to set*@extra_perm: one extra permission

Proto:struct kern_ipc_perm *ipcctl_obtain_check(struct ipc_namespace *ns, struct ipc_ids *ids, int id, int cmd, struct ipc64_perm *perm, int extra_perm)

Type:struct kern_ipc_perm

Parameter:

TypeParameterName
struct ipc_namespace *ns
struct ipc_ids *ids
intid
intcmd
struct ipc64_perm *perm
intextra_perm
693  err = -EPERM
696  ipcp = pc_obtain_object_check*@ids: ipc identifier set*@id: ipc id to look for* Similar to ipc_obtain_object_idr() but also checks the ipc object* sequence number.* Call inside the RCU critical section.* The ipc object is *not* locked on exit.
697  If IS_ERR(ipcp) Then
698  err = PTR_ERR(ipcp)
699  Go to err
702  audit_ipc_obj(ipcp)
703  If cmd == set ipc_perm options Then audit_ipc_set_perm(extra_perm, uid, gid, mode)
707  euid = current_euid()
708  If uid_eq(euid, cuid) || uid_eq(euid, uid) || ns_capable(user_ns, Allow setting zone reclaim policy ) Then Return ipcp
711  err :
712  Return ERR_PTR(err)
Caller
NameDescribe
msgctl_downThis function handles some msgctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
semctl_downThis function handles some semctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
shmctl_downThis function handles some shmctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.