函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-27 10:15:39
Last Modify:2020-03-17 13:28:47 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:send_signal

函数原型:static int send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t, enum pid_type type)

返回类型:int

参数:

类型参数名称
intsig
struct kernel_siginfo *info
struct task_struct *t
enum pid_typetype
1207  bool force = false
1209  如果info恒等于These can be the second arg to send_sig_info/send_group_sig_info.
1211  force等于非task_pid_nr_ns(当前进程, task_active_pid_ns(t))
1212  否则如果info恒等于SEND_SIG_PRIV
1214  force = true
1215  否则如果has_si_pid_and_uid(info)则
1219  _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
1220  t_user_ns等于task_cred_xxx(t, user_ns)
1221  如果current_user_ns()不等于t_user_ns
1225  _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()
1228  force等于si_code恒等于sent by the kernel from somewhere
1232  si_pid等于0
1233  force = true
1236  返回:__send_signal(sig, info, t, type, force)
调用者
名称描述
__group_send_sig_info
do_send_sig_info
force_sig_info_to_taskForce a signal that the process can't ignore: if necessary* we unblock the signal and change any SIG_IGN to SIG_DFL.* Note: If we unblock the signal, we always reset it to SIG_DFL,* since we do not want to have a signal handler that was blocked
ptrace_signal
kdb_send_sigkdb_send_sig - Allows kdb to send signals without exposing* signal internals. This function checks if the required locks are* available before calling the main signal code, to avoid kdb* deadlocks.