函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\select.c Create Date:2022-07-29 10:37:06
Last Modify:2020-03-18 10:25:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:We can actually return ERESTARTSYS instead of EINTR, but I'd* like to be certain this leads to no problems. So I return* EINTR just for safety.* Update: ERESTARTSYS breaks at least the xview clock binary, so

函数原型:static int compat_core_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp, compat_ulong_t __user *exp, struct timespec64 *end_time)

返回类型:int

参数:

类型参数名称
intn
compat_ulong_t __user *inp
compat_ulong_t __user *outp
compat_ulong_t __user *exp
struct timespec64 *end_time
1180  ret等于负EINVAL
1184  如果n小于0则转到:out_nofds
1188  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1189  fdt等于files_fdtable(files)
1190  max_fds等于max_fds
1191  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1192  如果n大于max_fdsn等于max_fds
1200  size等于FDS_BYTES(n)
1201  bits等于stack_fds
1202  如果size大于stack_fds的长度除6则
1203  bits等于分配数组内存
1204  ret等于负ENOMEM
1205  如果非bits则转到:out_nofds
1208  in等于bits
1209  out等于bitssize
1210  ex等于bits加2乘size
1211  res_in等于bits加3乘size
1212  res_out等于bits加4乘size
1213  res_ex等于bits加5乘size
1215  如果ret等于Ooo, nasty. We need here to frob 32-bit unsigned longs to* 64-bit unsigned longs.ret等于Ooo, nasty. We need here to frob 32-bit unsigned longs to* 64-bit unsigned longs.ret等于Ooo, nasty. We need here to frob 32-bit unsigned longs to* 64-bit unsigned longs.则转到:out
1219  zero_fd_set(n, res_in)
1220  zero_fd_set(n, res_out)
1221  zero_fd_set(n, res_ex)
1223  ret等于do_select(n, & fds, end_time)
1225  如果ret小于0则转到:out
1227  如果非ret
1228  ret等于负start if no handler..
1229  如果signal_pending(当前进程)则转到:out
1231  ret等于0
1234  如果compat_set_fd_set(n, inp, res_in)或compat_set_fd_set(n, outp, res_out)或compat_set_fd_set(n, exp, res_ex)则ret等于负EFAULT
1238  out :
1239  如果bits不等于stack_fds释放内存
1241  out_nofds :
1242  返回:ret
调用者
名称描述
do_compat_select
do_compat_pselect