Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-28 09:15:42
Last Modify:2020-03-17 13:28:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:send_signal

Proto:static int send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t, enum pid_type type)

Type:int

Parameter:

TypeParameterName
intsig
struct kernel_siginfo *info
struct task_struct *t
enum pid_typetype
1207  bool force = false
1209  If info == These can be the second arg to send_sig_info/send_group_sig_info. Then
1211  force = Not task_pid_nr_ns(current process, task_active_pid_ns(t))
1212  Else if info == SEND_SIG_PRIV Then
1214  force = true
1215  Else if has_si_pid_and_uid(info) Then
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  If current_user_ns() != t_user_ns Then
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  Return __send_signal(sig, info, t, type, force)
Caller
NameDescribe
__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.