Lines Matching refs:to

10  *		Changes to use preallocated sigqueue structures
11 * to allow signals to be sent reliably.
88 /* SIGKILL and SIGSTOP may not be sent to the global init */
96 /* Only allow kernel generated signals to this kthread */
115 * Tracers may want to know about even ignored signal unless it
210 * synchronous signals that need to be dequeued first.
239 /* Nothing to do */
263 * @mask: pending bits to set
297 * If JOBCTL_TRAPPING is set, a ptracer is waiting for us to enter TRACED.
299 * locking. @task->siglock guarantees that @task->parent points to the
317 * @mask: pending bits to clear
355 * %true if group stop completion should be notified to the parent, %false
374 * Tell the caller to notify completion iff we are entering into a
402 * appropriate lock must be held to stop the target task from exiting
413 * Protect access to @t credentials. This can go away when all
416 * NOTE! A pending signal will hold on to the user refcount,
418 * changes from/to zero.
571 * Collect the siginfo appropriate to this signal. Check if
621 * Dequeue a signal and return the element to the caller, which is
622 * expected to free it.
624 * All callers have to hold the siglock.
646 * itimers in the signal delivery path to prevent DoS
650 * queued once. Changing the restart behaviour to
676 * stop signal it is about to process is no longer in the
682 * is to alert stop-signal processing code when another
690 * Release the siglock to ensure proper locking order
693 * about to disable them again anyway.
699 /* Don't expose the si_sys_private value to userspace */
752 * NOTE! we rely on the previous spin_lock to
757 * No need to set need_resched since signal event passing
868 * ptrace_trap_notify - schedule trap to notify ptracer
869 * @t: tracee wanting to notify tracer
872 * TRAP_STOP to notify ptracer of an event. @t must have been seized by
878 * eventually taken without returning to userland after the existing traps
971 * Test if P wants to take SIG. After we've checked all threads with this,
972 * it's equivalent to finding no threads not blocking SIG. Any threads not
976 * will be equivalent to sending it to one such thread.
1001 * Now find a thread we can wake up to take the signal off the queue.
1009 * There is just one thread and it does not need to be woken.
1015 * Otherwise try to find a suitable thread.
1022 * No thread needs to be woken.
1040 * This signal will be fatal to the whole group.
1063 * Tell the chosen thread to wake up and dequeue it.
1108 * defined whether kill() does so. We attempt to do so, on
1110 * allowed to fail with EAGAIN when low on memory we just
1316 * we unblock the signal and change any SIG_IGN to SIG_DFL.
1318 * Note: If we unblock the signal, we always reset it to SIG_DFL,
1319 * since we do not want to have a signal handler that was blocked
1322 * We don't want to have recursive SIGSEGV's etc, for example,
1347 * debugging to leave init killable. But HANDLER_EXIT is always fatal.
1407 * We need to ensure that tsk->sighand is still the same
1438 * send signal info to all the members of a thread group or to the
1457 * __kill_pgrp_info() sends a signal to a process group: this is what the tty
1547 * copy_siginfo_to_user32 to detect this confusion of formats, so
1548 * handle this by requiring the caller of kill_pid_usb_asyncio to
1549 * notice when this situration takes place and to store the 32bit
1611 /* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */
1710 * the problem was already a SIGSEGV, we'll want to
1711 * make sure we don't even try to deliver the signal..
1836 * force_sig_seccomp - signals the task to allow in-process syscall emulation
1837 * @syscall: syscall number to send to userland
1838 * @reason: filter-supplied reason code to send to userland (via si_errno)
1839 * @force_coredump: true to trigger a coredump
1930 * afford to lose notifications of asynchronous events, like timer
1933 * allocation fails we are able to report the failure to the application
1949 * to serialize with collect_signal() or with
1980 * This function is used by POSIX timers to deliver a timer signal.
1982 * set), the signal must be delivered to the specific thread (queues
1985 * Where type is not PIDTYPE_PID, signals must be delivered to the
1986 * process. In this case, prefer to deliver to current if it is in
2044 * Returns true if our parent ignored us and so we've switched to
2082 * We are under tasklist_lock here so our parent is tied to
2089 * same as rcu_read_lock(), but according to Oleg, this is not
2090 * correct to rely on this
2119 * defines special semantics for setting SIGCHLD to SIG_IGN
2123 * signal handler, we just set this to tell do_exit that we
2152 * @why: CLD_{CONTINUED|STOPPED|TRAPPED} to report
2155 * @for_ptracer is %false, @tsk's group leader notifies to its real parent.
2156 * If %true, @tsk reports to @tsk->parent which should be the ptracer.
2224 * That makes it a way to test a stopped process for
2240 * The arch code has something special to do before a
2241 * ptrace stop. This is allowed to block, e.g. for faults
2256 * signals here to prevent ptrace_stop sleeping in schedule.
2265 * We're committing to trapping. TRACED should be visible before
2267 * Also, transition to TRACED and updates to ->jobctl should be
2268 * atomic with respect to siglock and should be done after the arch
2289 * If @why is CLD_STOPPED, we're trapping to participate in a group
2335 * view but extends the runtime by one HZ tick time due to the
2347 * with preemption disabled due to the 'sleeping' spinlock
2361 * last_siginfo, so that we are sure to have synchronized with
2362 * any signal-sending on another CPU that wants to examine it.
2464 * an intervening stop signal is required to cause two
2476 * Setting state to TASK_STOPPED for a group
2496 * is a group stop in progress and we are the last to stop,
2497 * report to the parent.
2510 * group stop and should always be delivered to the real
2571 * Puts the task into frozen state, if only the task is not about to quit.
2583 * let's make another loop to give it a chance to be handled.
2594 * pending traps. Clear TIF_SIGPENDING to not get out of schedule()
2611 * to stop after return from ptrace_stop(). In this case it will
2690 * Do this once, we can't return to user-mode if freezing() == T.
2700 * Every stopped thread goes here after wakeup. Check to see if
2748 * implies do_group_exit() or return to PF_USER_WORKER,
2749 * no need to initialize ksig->info/etc.
2781 * need to be delivered before any other pending signals
2783 * frame points to the faulting instruction.
2840 * The default action is to stop all threads in
2843 * always works. Note that siglock needs to be
2844 * dropped during the call to is_orphaned_pgrp()
2846 * This allows an intervening SIGCONT to be posted.
2847 * We need to check for that and bail out if necessary.
2866 * We didn't actually stop, due to a race
2887 * If it was able to dump core, this kills all
2923 * signal_delivered - called after signal delivery to update blocked signals
2961 * It could be that complete_signal() picked us to notify about the
2962 * group-wide signal. Other threads should be notified now to take
2997 * @tsk is about to have PF_EXITING set - lock out users which
3034 * should always go to the real parent of the group leader.
3077 * It is wrong to change ->blocked directly, this helper should be used
3078 * to ensure the process can't miss a shared signal we are going to block.
3092 * to do. The current->blocked shouldn't be modified by other task.
3103 * This is also useful for kernel threads that want to temporarily
3188 * @how: whether to add, remove, or set signals
3375 int copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from)
3377 char __user *expansion = si_expansion(to);
3378 if (copy_to_user(to, from , sizeof(struct kernel_siginfo)))
3396 * will return this data to userspace exactly.
3408 static int __copy_siginfo_from_user(int signo, kernel_siginfo_t *to,
3411 if (copy_from_user(to, from, sizeof(struct kernel_siginfo)))
3413 to->si_signo = signo;
3414 return post_copy_siginfo_from_user(to, from);
3417 int copy_siginfo_from_user(kernel_siginfo_t *to, const siginfo_t __user *from)
3419 if (copy_from_user(to, from, sizeof(struct kernel_siginfo)))
3421 return post_copy_siginfo_from_user(to, from);
3427 * @to: compat siginfo destination
3431 * fortunately it doesn't have to. The only valid callers for this function are
3435 void copy_siginfo_to_external32(struct compat_siginfo *to,
3438 memset(to, 0, sizeof(*to));
3440 to->si_signo = from->si_signo;
3441 to->si_errno = from->si_errno;
3442 to->si_code = from->si_code;
3445 to->si_pid = from->si_pid;
3446 to->si_uid = from->si_uid;
3449 to->si_tid = from->si_tid;
3450 to->si_overrun = from->si_overrun;
3451 to->si_int = from->si_int;
3454 to->si_band = from->si_band;
3455 to->si_fd = from->si_fd;
3458 to->si_addr = ptr_to_compat(from->si_addr);
3461 to->si_addr = ptr_to_compat(from->si_addr);
3462 to->si_trapno = from->si_trapno;
3465 to->si_addr = ptr_to_compat(from->si_addr);
3466 to->si_addr_lsb = from->si_addr_lsb;
3469 to->si_addr = ptr_to_compat(from->si_addr);
3470 to->si_lower = ptr_to_compat(from->si_lower);
3471 to->si_upper = ptr_to_compat(from->si_upper);
3474 to->si_addr = ptr_to_compat(from->si_addr);
3475 to->si_pkey = from->si_pkey;
3478 to->si_addr = ptr_to_compat(from->si_addr);
3479 to->si_perf_data = from->si_perf_data;
3480 to->si_perf_type = from->si_perf_type;
3481 to->si_perf_flags = from->si_perf_flags;
3484 to->si_pid = from->si_pid;
3485 to->si_uid = from->si_uid;
3486 to->si_status = from->si_status;
3487 to->si_utime = from->si_utime;
3488 to->si_stime = from->si_stime;
3491 to->si_pid = from->si_pid;
3492 to->si_uid = from->si_uid;
3493 to->si_int = from->si_int;
3496 to->si_call_addr = ptr_to_compat(from->si_call_addr);
3497 to->si_syscall = from->si_syscall;
3498 to->si_arch = from->si_arch;
3503 int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
3509 if (copy_to_user(to, &new, sizeof(struct compat_siginfo)))
3514 static int post_copy_siginfo_from_user32(kernel_siginfo_t *to,
3517 clear_siginfo(to);
3518 to->si_signo = from->si_signo;
3519 to->si_errno = from->si_errno;
3520 to->si_code = from->si_code;
3523 to->si_pid = from->si_pid;
3524 to->si_uid = from->si_uid;
3527 to->si_tid = from->si_tid;
3528 to->si_overrun = from->si_overrun;
3529 to->si_int = from->si_int;
3532 to->si_band = from->si_band;
3533 to->si_fd = from->si_fd;
3536 to->si_addr = compat_ptr(from->si_addr);
3539 to->si_addr = compat_ptr(from->si_addr);
3540 to->si_trapno = from->si_trapno;
3543 to->si_addr = compat_ptr(from->si_addr);
3544 to->si_addr_lsb = from->si_addr_lsb;
3547 to->si_addr = compat_ptr(from->si_addr);
3548 to->si_lower = compat_ptr(from->si_lower);
3549 to->si_upper = compat_ptr(from->si_upper);
3552 to->si_addr = compat_ptr(from->si_addr);
3553 to->si_pkey = from->si_pkey;
3556 to->si_addr = compat_ptr(from->si_addr);
3557 to->si_perf_data = from->si_perf_data;
3558 to->si_perf_type = from->si_perf_type;
3559 to->si_perf_flags = from->si_perf_flags;
3562 to->si_pid = from->si_pid;
3563 to->si_uid = from->si_uid;
3564 to->si_status = from->si_status;
3567 to->si_utime = from->_sifields._sigchld_x32._utime;
3568 to->si_stime = from->_sifields._sigchld_x32._stime;
3572 to->si_utime = from->si_utime;
3573 to->si_stime = from->si_stime;
3577 to->si_pid = from->si_pid;
3578 to->si_uid = from->si_uid;
3579 to->si_int = from->si_int;
3582 to->si_call_addr = compat_ptr(from->si_call_addr);
3583 to->si_syscall = from->si_syscall;
3584 to->si_arch = from->si_arch;
3590 static int __copy_siginfo_from_user32(int signo, struct kernel_siginfo *to,
3599 return post_copy_siginfo_from_user32(to, &from);
3602 int copy_siginfo_from_user32(struct kernel_siginfo *to,
3610 return post_copy_siginfo_from_user32(to, &from);
3616 * @which: queued signals to wait for
3623 ktime_t *to = NULL, timeout = KTIME_MAX;
3633 to = &timeout;
3637 * Invert the set of allowed signals to get those we want to block.
3657 ret = schedule_hrtimeout_range(to, tsk->timer_slack_ns,
3674 * @uthese: queued signals to wait for
3820 * sys_kill - send a signal to a process
3822 * @sig: signal to be sent
3888 * @sig: signal to send
3892 * Send the signal to the thread group or to the individual thread depending
3894 * In the future extension to @flags may be used to override the default scope
3908 /* Enforce flags be set to 0 until we add an extension. */
3959 /* Only allow sending arbitrary signals to yourself. */
4017 * sys_tgkill - send signal to one specific thread
4020 * @sig: signal to be sent
4023 * exists but it's not belonging to the target process anymore. This
4036 * sys_tkill - send signal to one specific task
4038 * @sig: signal to be sent
4040 * Send a signal to only one task, even if it's a CLONE_THREAD task.
4053 /* Not even root can pretend to send signals from the kernel.
4065 * sys_rt_sigqueueinfo - send signal information to a signal
4067 * @sig: signal to be sent
4068 * @uinfo: signal info to be sent
4100 /* Not even root can pretend to send signals from the kernel.
4181 * Make sure that we never accidentally claim to support SA_UNSUPPORTED,
4187 * Clear unknown flag bits in order to allow userspace to detect missing
4188 * support for flag bits and to allow the kernel to use non-uapi bits
4204 * "Setting a signal action to SIG_IGN for a signal that is
4205 * pending shall cause the pending signal to be discarded,
4208 * "Setting a signal action to SIG_DFL for a signal that is
4209 * pending and whose default action is to ignore the signal
4210 * (for example, SIGCHLD), shall cause the pending signal to
4428 * @how: whether to add, remove, or set signals
4429 * @nset: signals to add or remove (if non-null)
4479 * @sig: signal to be sent
4481 * @oact: used to save the previous sigaction
4861 * kdb_send_sig - Allows kdb to send signals without exposing
4863 * available before calling the main signal code, to avoid kdb
4884 "Reissue the kill command if you want to risk "
4891 kdb_printf("Fail to deliver Signal %d to process %d.\n",
4894 kdb_printf("Signal %d is sent to process %d.\n", sig, t->pid);