Function report |
Source Code:kernel\kcmp.c |
Create Date:2022-07-28 10:36:54 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:SYSCALL_DEFINE5
Proto:SYSCALL_DEFINE5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2)
Type:
Parameter:Nothing
163 | task1 = find_task_by_vpid(pid1) |
164 | task2 = find_task_by_vpid(pid2) |
165 | If Not task1 || Not task2 Then Go to err_no_task |
168 | get_task_struct(task1) |
169 | get_task_struct(task2) |
176 | ret = kcmp_lock( & cred_guard_mutex, & cred_guard_mutex) |
180 | If Not ptrace_may_access(task1, PTRACE_MODE_READ_REALCREDS) || Not ptrace_may_access(task2, PTRACE_MODE_READ_REALCREDS) Then |
183 | Go to err_unlock |
200 | ret = 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future) |
201 | Break |
202 | Case type == KCMP_FILES |
203 | ret = 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future) |
204 | Break |
206 | ret = 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future) |
207 | Break |
208 | Case type == KCMP_SIGHAND |
209 | ret = 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future) |
210 | Break |
212 | ret = 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future) |
213 | Break |
214 | Case type == KCMP_SYSVSEM |
216 | ret = 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future) |
222 | Break |
223 | Case type == KCMP_EPOLL_TFD |
226 | Default |
231 | err_unlock : |
232 | kcmp_unlock( & cred_guard_mutex, & cred_guard_mutex) |
234 | err : |
235 | put_task_struct(task1) |
236 | put_task_struct(task2) |
238 | Return ret |
240 | err_no_task : |
242 | Return -ESRCH |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |