Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\syscall.c Create Date:2022-07-28 16:49:00
Last Modify:2020-03-17 22:59:43 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ksys_ipc

Proto:int ksys_ipc(unsigned int call, int first, unsigned long second, unsigned long third, void __user *ptr, long fifth)

Type:int

Parameter:

TypeParameterName
unsigned intcall
intfirst
unsigned longsecond
unsigned longthird
void __user *ptr
longfifth
25  version = call >> 16
26  call &= 0xffff
29  Case call == SEMOP
30  Return ksys_semtimedop(first, (structsembuf__user * )ptr, second, NULL)
32  Case call == SEMTIMEDOP
33  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_64BIT) Then Return ksys_semtimedop(first, ptr, second, (conststruct__kernel_timespec__user * )fifth)
36  Else if IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_COMPAT_32BIT_TIME) Then Return compat_ksys_semtimedop(first, ptr, second, (conststructold_timespec32__user * )fifth)
39  Else Return -ENOSYS
42  Case call == SEMGET
43  Return ksys_semget(first, second, third)
44  Case call == SEMCTL
46  If Not ptr Then Return -EINVAL
48  If Get a simple variable from user space(arg, (unsignedlong__user * )ptr) Then Return -EFAULT
50  Return ksys_old_semctl(first, second, third, arg)
53  Case call == MSGSND
54  Return ksys_msgsnd(first, (structmsgbuf__user * )ptr, second, third)
56  Case call == MSGRCV
58  Case version == 0
60  If Not ptr Then Return -EINVAL
63  If copy_from_user( & tmp, (structipc_kludge__user * )ptr, size of tmp ) Then Return -EFAULT
70  Default
71  Return ksys_msgrcv(first, (structmsgbuf__user * )ptr, second, fifth, third)
75  Case call == MSGGET
76  Return ksys_msgget((key_t)first, second)
77  Case call == MSGCTL
78  Return ksys_old_msgctl(first, second, (structmsqid_ds__user * )ptr)
81  Case call == SHMAT
83  Default
87  If ret Then Return ret
89  Return Write a simple value into user space(raddr, (unsignedlong__user * )third)
91  Case version == 1
96  Return -EINVAL
98  Case call == SHMDT
99  Return detach and kill segment if marked destroyed.* The work is done in shm_close.
100  Case call == SHMGET
101  Return ksys_shmget(first, second, third)
102  Case call == SHMCTL
103  Return ksys_old_shmctl(first, second, (structshmid_ds__user * )ptr)
105  Default
106  Return -ENOSYS
Caller
NameDescribe
SYSCALL_DEFINE6