函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ksys_ipc

函数原型:int ksys_ipc(unsigned int call, int first, unsigned long second, unsigned long third, void __user *ptr, long fifth)

返回类型:int

参数:

类型参数名称
unsigned intcall
intfirst
unsigned longsecond
unsigned longthird
void __user *ptr
longfifth
25  version等于call右移16位
26  call与等于0xffff
29  :call恒等于SEMOP
30  返回:ksys_semtimedop(first, (structsembuf__user * )ptr, second, NULL)
32  :call恒等于SEMTIMEDOP
33  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_64BIT)则返回:ksys_semtimedop(first, ptr, second, (conststruct__kernel_timespec__user * )fifth)
36  否则如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_COMPAT_32BIT_TIME)则返回:compat_ksys_semtimedop(first, ptr, second, (conststructold_timespec32__user * )fifth)
39  否则返回:负ENOSYS
42  :call恒等于SEMGET
43  返回:ksys_semget(first, second, third)
44  :call恒等于SEMCTL
46  如果非ptr则返回:负EINVAL
48  如果Careful: we have to cast the result to the type of the pointer* for sign reasons(arg, (unsignedlong__user * )ptr)则返回:负EFAULT
50  返回:ksys_old_semctl(first, second, third, arg)
53  :call恒等于MSGSND
54  返回:ksys_msgsnd(first, (structmsgbuf__user * )ptr, second, third)
56  :call恒等于MSGRCV
58  :version恒等于0
60  如果非ptr则返回:负EINVAL
63  如果copy_from_user( & tmp, (structipc_kludge__user * )ptr, tmp的长度)则返回:负EFAULT
70  默认
71  返回:ksys_msgrcv(first, (structmsgbuf__user * )ptr, second, fifth, third)
75  :call恒等于MSGGET
76  返回:ksys_msgget((key_t)first, second)
77  :call恒等于MSGCTL
78  返回:ksys_old_msgctl(first, second, (structmsqid_ds__user * )ptr)
81  :call恒等于SHMAT
83  默认
87  如果ret则返回:ret
91  :version恒等于1
96  返回:负EINVAL
98  :call恒等于SHMDT
99  返回:detach and kill segment if marked destroyed.* The work is done in shm_close.
100  :call恒等于SHMGET
101  返回:ksys_shmget(first, second, third)
102  :call恒等于SHMCTL
103  返回:ksys_old_shmctl(first, second, (structshmid_ds__user * )ptr)
105  默认
106  返回:负ENOSYS
调用者
名称描述
SYSCALL_DEFINE6