函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\shm.c Create Date:2022-07-27 18:23:30
Last Modify:2020-03-17 22:58:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:compat_ksys_shmctl

函数原型:long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version)

返回类型:long

参数:

类型参数名称
intshmid
intcmd
void __user *uptr
intversion
1341  ns等于ipc_ns
1343  如果cmd小于0或shmid小于0则返回:负EINVAL
1347  :cmd恒等于see ipcs
1349  err等于shmctl_ipc_info(ns, & shminfo)
1350  如果err小于0则返回:err
1352  如果copy_compat_shminfo_to_user(uptr, & shminfo, version)则err等于负EFAULT
1354  返回:err
1356  :cmd恒等于SHM_INFO
1358  err等于shmctl_shm_info(ns, & shm_info)
1359  如果err小于0则返回:err
1361  如果put_compat_shm_info( & shm_info, uptr)则err等于负EFAULT
1363  返回:err
1365  :cmd恒等于get ipc_perm options
1366  :cmd恒等于SHM_STAT_ANY
1367  :cmd恒等于pcs ctl commands
1368  err等于shmctl_stat(ns, shmid, cmd, & sem64)
1369  如果err小于0则返回:err
1371  如果copy_compat_shmid_to_user(uptr, & sem64, version)则err等于负EFAULT
1373  返回:err
1375  :cmd恒等于set ipc_perm options
1376  如果copy_compat_shmid_from_user( & sem64, uptr, version)则返回:负EFAULT
1379  :cmd恒等于move resource
1380  返回:This 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.
1381  :cmd恒等于super user shmctl commands
1382  :cmd恒等于SHM_UNLOCK
1383  返回:shmctl_do_lock(ns, shmid, cmd)
1384  退出
1385  默认
1386  返回:负EINVAL
1388  返回:err
调用者
名称描述
COMPAT_SYSCALL_DEFINE3