Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\sem.c Create Date:2022-07-28 16:45:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:compat_ksys_semctl

Proto:static long compat_ksys_semctl(int semid, int semnum, int cmd, int arg, int version)

Type:long

Parameter:

TypeParameterName
intsemid
intsemnum
intcmd
intarg
intversion
1758  __user * p = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
1763  ns = ipc_ns
1765  If semid < 0 Then Return -EINVAL
1769  Case & == see ipcs
1770  Case & == SEM_INFO
1771  Return semctl_info(ns, semid, cmd, p)
1772  Case & == get ipc_perm options
1773  Case & == pcs ctl cmds
1774  Case & == SEM_STAT_ANY
1775  err = semctl_stat(ns, semid, cmd, & semid64)
1776  If err < 0 Then Return err
1778  If copy_compat_semid_to_user(p, & semid64, version) Then err = -EFAULT
1780  Return err
1781  Case & == get semval
1782  Case & == get sempid
1783  Case & == get semncnt
1784  Case & == get semzcnt
1785  Case & == get all semval's
1786  Case & == set all semval's
1787  Return semctl_main(ns, semid, semnum, cmd, p)
1788  Case & == set semval
1789  Return semctl_setval(ns, semid, semnum, arg)
1790  Case & == set ipc_perm options
1791  If copy_compat_semid_from_user( & semid64, p, version) Then Return -EFAULT
1794  Case & == move resource
1795  Return This 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.
1796  Default
1797  Return -EINVAL
Caller
NameDescribe
COMPAT_SYSCALL_DEFINE4