Lines Matching refs:info
492 int sig = q->info.si_signo; in __flush_itimer_signals()
494 if (likely(q->info.si_code != SI_TIMER)) { in __flush_itimer_signals()
562 static void collect_signal(int sig, struct sigpending *list, kernel_siginfo_t *info, in collect_signal() argument
572 if (q->info.si_signo == sig) { in collect_signal()
584 copy_siginfo(info, &first->info); in collect_signal()
588 (info->si_code == SI_TIMER) && in collect_signal()
589 (info->si_sys_private); in collect_signal()
598 clear_siginfo(info); in collect_signal()
599 info->si_signo = sig; in collect_signal()
600 info->si_errno = 0; in collect_signal()
601 info->si_code = SI_USER; in collect_signal()
602 info->si_pid = 0; in collect_signal()
603 info->si_uid = 0; in collect_signal()
608 kernel_siginfo_t *info, bool *resched_timer) in __dequeue_signal() argument
613 collect_signal(sig, pending, info, resched_timer); in __dequeue_signal()
623 int dequeue_signal(struct task_struct *tsk, sigset_t *mask, kernel_siginfo_t *info) in dequeue_signal() argument
631 signr = __dequeue_signal(&tsk->pending, mask, info, &resched_timer); in dequeue_signal()
634 mask, info, &resched_timer); in dequeue_signal()
690 posixtimer_rearm(info); in dequeue_signal()
694 info->si_sys_private = 0; in dequeue_signal()
701 static int dequeue_synchronous_signal(kernel_siginfo_t *info) in dequeue_synchronous_signal() argument
718 if ((q->info.si_code > SI_USER) && in dequeue_synchronous_signal()
719 (sigmask(q->info.si_signo) & SYNCHRONOUS_MASK)) { in dequeue_synchronous_signal()
730 if (q->info.si_signo == sync->info.si_signo) in dequeue_synchronous_signal()
734 sigdelset(&pending->signal, sync->info.si_signo); in dequeue_synchronous_signal()
738 copy_siginfo(info, &sync->info); in dequeue_synchronous_signal()
740 return info->si_signo; in dequeue_synchronous_signal()
785 if (sigismember(mask, q->info.si_signo)) { in flush_sigqueue_mask()
792 static inline int is_si_special(const struct kernel_siginfo *info) in is_si_special() argument
794 return info <= SEND_SIG_PRIV; in is_si_special()
797 static inline bool si_fromuser(const struct kernel_siginfo *info) in si_fromuser() argument
799 return info == SEND_SIG_NOINFO || in si_fromuser()
800 (!is_si_special(info) && SI_FROMUSER(info)); in si_fromuser()
822 static int check_kill_permission(int sig, struct kernel_siginfo *info, in check_kill_permission() argument
831 if (!si_fromuser(info)) in check_kill_permission()
855 return security_task_kill(t, info, sig, NULL); in check_kill_permission()
1065 static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t, in __send_signal() argument
1106 override_rlimit = (is_si_special(info) || info->si_code >= 0); in __send_signal()
1113 switch ((unsigned long) info) { in __send_signal()
1115 clear_siginfo(&q->info); in __send_signal()
1116 q->info.si_signo = sig; in __send_signal()
1117 q->info.si_errno = 0; in __send_signal()
1118 q->info.si_code = SI_USER; in __send_signal()
1119 q->info.si_pid = task_tgid_nr_ns(current, in __send_signal()
1122 q->info.si_uid = in __send_signal()
1128 clear_siginfo(&q->info); in __send_signal()
1129 q->info.si_signo = sig; in __send_signal()
1130 q->info.si_errno = 0; in __send_signal()
1131 q->info.si_code = SI_KERNEL; in __send_signal()
1132 q->info.si_pid = 0; in __send_signal()
1133 q->info.si_uid = 0; in __send_signal()
1136 copy_siginfo(&q->info, info); in __send_signal()
1139 } else if (!is_si_special(info) && in __send_signal()
1140 sig >= SIGRTMIN && info->si_code != SI_USER) { in __send_signal()
1177 trace_signal_generate(sig, info, t, type != PIDTYPE_PID, result); in __send_signal()
1181 static inline bool has_si_pid_and_uid(struct kernel_siginfo *info) in has_si_pid_and_uid() argument
1184 switch (siginfo_layout(info->si_signo, info->si_code)) { in has_si_pid_and_uid()
1203 static int send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t, in send_signal() argument
1209 if (info == SEND_SIG_NOINFO) { in send_signal()
1212 } else if (info == SEND_SIG_PRIV) { in send_signal()
1215 } else if (has_si_pid_and_uid(info)) { in send_signal()
1222 kuid_t uid = make_kuid(current_user_ns(), info->si_uid); in send_signal()
1223 info->si_uid = from_kuid_munged(t_user_ns, uid); in send_signal()
1228 force = (info->si_code == SI_KERNEL); in send_signal()
1232 info->si_pid = 0; in send_signal()
1236 return __send_signal(sig, info, t, type, force); in send_signal()
1273 __group_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p) in __group_send_sig_info() argument
1275 return send_signal(sig, info, p, PIDTYPE_TGID); in __group_send_sig_info()
1278 int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p, in do_send_sig_info() argument
1285 ret = send_signal(sig, info, p, type); in do_send_sig_info()
1304 force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t) in force_sig_info_to_task() argument
1309 int sig = info->si_signo; in force_sig_info_to_task()
1328 ret = send_signal(sig, info, t, PIDTYPE_PID); in force_sig_info_to_task()
1334 int force_sig_info(struct kernel_siginfo *info) in force_sig_info() argument
1336 return force_sig_info_to_task(info, current); in force_sig_info()
1398 int group_send_sig_info(int sig, struct kernel_siginfo *info, in group_send_sig_info() argument
1404 ret = check_kill_permission(sig, info, p); in group_send_sig_info()
1408 ret = do_send_sig_info(sig, info, p, type); in group_send_sig_info()
1418 int __kill_pgrp_info(int sig, struct kernel_siginfo *info, struct pid *pgrp) in __kill_pgrp_info() argument
1426 int err = group_send_sig_info(sig, info, p, PIDTYPE_PGID); in __kill_pgrp_info()
1433 int kill_pid_info(int sig, struct kernel_siginfo *info, struct pid *pid) in kill_pid_info() argument
1442 error = group_send_sig_info(sig, info, p, PIDTYPE_TGID); in kill_pid_info()
1455 static int kill_proc_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_proc_info() argument
1459 error = kill_pid_info(sig, info, find_vpid(pid)); in kill_proc_info()
1503 struct kernel_siginfo info; in kill_pid_usb_asyncio() local
1508 clear_siginfo(&info); in kill_pid_usb_asyncio()
1509 info.si_signo = sig; in kill_pid_usb_asyncio()
1510 info.si_errno = errno; in kill_pid_usb_asyncio()
1511 info.si_code = SI_ASYNCIO; in kill_pid_usb_asyncio()
1512 *((sigval_t *)&info.si_pid) = addr; in kill_pid_usb_asyncio()
1527 ret = security_task_kill(p, &info, sig, cred); in kill_pid_usb_asyncio()
1533 ret = __send_signal(sig, &info, p, PIDTYPE_TGID, false); in kill_pid_usb_asyncio()
1551 static int kill_something_info(int sig, struct kernel_siginfo *info, pid_t pid) in kill_something_info() argument
1557 ret = kill_pid_info(sig, info, find_vpid(pid)); in kill_something_info()
1568 ret = __kill_pgrp_info(sig, info, in kill_something_info()
1577 int err = group_send_sig_info(sig, info, p, in kill_something_info()
1595 int send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p) in send_sig_info() argument
1604 return do_send_sig_info(sig, info, p, PIDTYPE_PID); in send_sig_info()
1620 struct kernel_siginfo info; in force_sig() local
1622 clear_siginfo(&info); in force_sig()
1623 info.si_signo = sig; in force_sig()
1624 info.si_errno = 0; in force_sig()
1625 info.si_code = SI_KERNEL; in force_sig()
1626 info.si_pid = 0; in force_sig()
1627 info.si_uid = 0; in force_sig()
1628 force_sig_info(&info); in force_sig()
1656 struct kernel_siginfo info; in force_sig_fault_to_task() local
1658 clear_siginfo(&info); in force_sig_fault_to_task()
1659 info.si_signo = sig; in force_sig_fault_to_task()
1660 info.si_errno = 0; in force_sig_fault_to_task()
1661 info.si_code = code; in force_sig_fault_to_task()
1662 info.si_addr = addr; in force_sig_fault_to_task()
1664 info.si_trapno = trapno; in force_sig_fault_to_task()
1667 info.si_imm = imm; in force_sig_fault_to_task()
1668 info.si_flags = flags; in force_sig_fault_to_task()
1669 info.si_isr = isr; in force_sig_fault_to_task()
1671 return force_sig_info_to_task(&info, t); in force_sig_fault_to_task()
1688 struct kernel_siginfo info; in send_sig_fault() local
1690 clear_siginfo(&info); in send_sig_fault()
1691 info.si_signo = sig; in send_sig_fault()
1692 info.si_errno = 0; in send_sig_fault()
1693 info.si_code = code; in send_sig_fault()
1694 info.si_addr = addr; in send_sig_fault()
1696 info.si_trapno = trapno; in send_sig_fault()
1699 info.si_imm = imm; in send_sig_fault()
1700 info.si_flags = flags; in send_sig_fault()
1701 info.si_isr = isr; in send_sig_fault()
1703 return send_sig_info(info.si_signo, &info, t); in send_sig_fault()
1708 struct kernel_siginfo info; in force_sig_mceerr() local
1711 clear_siginfo(&info); in force_sig_mceerr()
1712 info.si_signo = SIGBUS; in force_sig_mceerr()
1713 info.si_errno = 0; in force_sig_mceerr()
1714 info.si_code = code; in force_sig_mceerr()
1715 info.si_addr = addr; in force_sig_mceerr()
1716 info.si_addr_lsb = lsb; in force_sig_mceerr()
1717 return force_sig_info(&info); in force_sig_mceerr()
1722 struct kernel_siginfo info; in send_sig_mceerr() local
1725 clear_siginfo(&info); in send_sig_mceerr()
1726 info.si_signo = SIGBUS; in send_sig_mceerr()
1727 info.si_errno = 0; in send_sig_mceerr()
1728 info.si_code = code; in send_sig_mceerr()
1729 info.si_addr = addr; in send_sig_mceerr()
1730 info.si_addr_lsb = lsb; in send_sig_mceerr()
1731 return send_sig_info(info.si_signo, &info, t); in send_sig_mceerr()
1737 struct kernel_siginfo info; in force_sig_bnderr() local
1739 clear_siginfo(&info); in force_sig_bnderr()
1740 info.si_signo = SIGSEGV; in force_sig_bnderr()
1741 info.si_errno = 0; in force_sig_bnderr()
1742 info.si_code = SEGV_BNDERR; in force_sig_bnderr()
1743 info.si_addr = addr; in force_sig_bnderr()
1744 info.si_lower = lower; in force_sig_bnderr()
1745 info.si_upper = upper; in force_sig_bnderr()
1746 return force_sig_info(&info); in force_sig_bnderr()
1752 struct kernel_siginfo info; in force_sig_pkuerr() local
1754 clear_siginfo(&info); in force_sig_pkuerr()
1755 info.si_signo = SIGSEGV; in force_sig_pkuerr()
1756 info.si_errno = 0; in force_sig_pkuerr()
1757 info.si_code = SEGV_PKUERR; in force_sig_pkuerr()
1758 info.si_addr = addr; in force_sig_pkuerr()
1759 info.si_pkey = pkey; in force_sig_pkuerr()
1760 return force_sig_info(&info); in force_sig_pkuerr()
1769 struct kernel_siginfo info; in force_sig_ptrace_errno_trap() local
1771 clear_siginfo(&info); in force_sig_ptrace_errno_trap()
1772 info.si_signo = SIGTRAP; in force_sig_ptrace_errno_trap()
1773 info.si_errno = errno; in force_sig_ptrace_errno_trap()
1774 info.si_code = TRAP_HWBKPT; in force_sig_ptrace_errno_trap()
1775 info.si_addr = addr; in force_sig_ptrace_errno_trap()
1776 return force_sig_info(&info); in force_sig_ptrace_errno_trap()
1843 int sig = q->info.si_signo; in send_sigqueue()
1868 BUG_ON(q->info.si_code != SI_TIMER); in send_sigqueue()
1869 q->info.si_overrun++; in send_sigqueue()
1873 q->info.si_overrun = 0; in send_sigqueue()
1882 trace_signal_generate(sig, &q->info, t, type != PIDTYPE_PID, result); in send_sigqueue()
1907 struct kernel_siginfo info; in do_notify_parent() local
1933 clear_siginfo(&info); in do_notify_parent()
1934 info.si_signo = sig; in do_notify_parent()
1935 info.si_errno = 0; in do_notify_parent()
1948 info.si_pid = task_pid_nr_ns(tsk, task_active_pid_ns(tsk->parent)); in do_notify_parent()
1949 info.si_uid = from_kuid_munged(task_cred_xxx(tsk->parent, user_ns), in do_notify_parent()
1954 info.si_utime = nsec_to_clock_t(utime + tsk->signal->utime); in do_notify_parent()
1955 info.si_stime = nsec_to_clock_t(stime + tsk->signal->stime); in do_notify_parent()
1957 info.si_status = tsk->exit_code & 0x7f; in do_notify_parent()
1959 info.si_code = CLD_DUMPED; in do_notify_parent()
1961 info.si_code = CLD_KILLED; in do_notify_parent()
1963 info.si_code = CLD_EXITED; in do_notify_parent()
1964 info.si_status = tsk->exit_code >> 8; in do_notify_parent()
1992 __group_send_sig_info(sig, &info, tsk->parent); in do_notify_parent()
2015 struct kernel_siginfo info; in do_notify_parent_cldstop() local
2028 clear_siginfo(&info); in do_notify_parent_cldstop()
2029 info.si_signo = SIGCHLD; in do_notify_parent_cldstop()
2030 info.si_errno = 0; in do_notify_parent_cldstop()
2035 info.si_pid = task_pid_nr_ns(tsk, task_active_pid_ns(parent)); in do_notify_parent_cldstop()
2036 info.si_uid = from_kuid_munged(task_cred_xxx(parent, user_ns), task_uid(tsk)); in do_notify_parent_cldstop()
2040 info.si_utime = nsec_to_clock_t(utime); in do_notify_parent_cldstop()
2041 info.si_stime = nsec_to_clock_t(stime); in do_notify_parent_cldstop()
2043 info.si_code = why; in do_notify_parent_cldstop()
2046 info.si_status = SIGCONT; in do_notify_parent_cldstop()
2049 info.si_status = tsk->signal->group_exit_code & 0x7f; in do_notify_parent_cldstop()
2052 info.si_status = tsk->exit_code & 0x7f; in do_notify_parent_cldstop()
2062 __group_send_sig_info(SIGCHLD, &info, parent); in do_notify_parent_cldstop()
2115 static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t *info) in ptrace_stop() argument
2121 if (arch_ptrace_stop_needed(exit_code, info)) { in ptrace_stop()
2134 arch_ptrace_stop(exit_code, info); in ptrace_stop()
2162 current->last_siginfo = info; in ptrace_stop()
2177 if (info && info->si_code >> 8 == PTRACE_EVENT_STOP) in ptrace_stop()
2254 kernel_siginfo_t info; in ptrace_do_notify() local
2256 clear_siginfo(&info); in ptrace_do_notify()
2257 info.si_signo = signr; in ptrace_do_notify()
2258 info.si_code = exit_code; in ptrace_do_notify()
2259 info.si_pid = task_pid_vnr(current); in ptrace_do_notify()
2260 info.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in ptrace_do_notify()
2263 ptrace_stop(exit_code, why, 1, &info); in ptrace_do_notify()
2473 static int ptrace_signal(int signr, kernel_siginfo_t *info) in ptrace_signal() argument
2485 ptrace_stop(signr, CLD_TRAPPED, 0, info); in ptrace_signal()
2500 if (signr != info->si_signo) { in ptrace_signal()
2501 clear_siginfo(info); in ptrace_signal()
2502 info->si_signo = signr; in ptrace_signal()
2503 info->si_errno = 0; in ptrace_signal()
2504 info->si_code = SI_USER; in ptrace_signal()
2506 info->si_pid = task_pid_vnr(current->parent); in ptrace_signal()
2507 info->si_uid = from_kuid_munged(current_user_ns(), in ptrace_signal()
2514 send_signal(signr, info, current, PIDTYPE_PID); in ptrace_signal()
2580 ksig->info.si_signo = signr = SIGKILL; in get_signal()
2622 signr = dequeue_synchronous_signal(&ksig->info); in get_signal()
2624 signr = dequeue_signal(current, ¤t->blocked, &ksig->info); in get_signal()
2630 signr = ptrace_signal(signr, &ksig->info); in get_signal()
2638 trace_signal_deliver(signr, &ksig->info, ka); in get_signal()
2694 if (likely(do_signal_stop(ksig->info.si_signo))) { in get_signal()
2718 print_fatal_signal(ksig->info.si_signo); in get_signal()
2728 do_coredump(&ksig->info); in get_signal()
2734 do_group_exit(ksig->info.si_signo); in get_signal()
3178 static inline char __user *si_expansion(const siginfo_t __user *info) in si_expansion() argument
3180 return ((char __user *)info) + sizeof(struct kernel_siginfo); in si_expansion()
3193 static int post_copy_siginfo_from_user(kernel_siginfo_t *info, in post_copy_siginfo_from_user() argument
3196 if (unlikely(!known_siginfo_layout(info->si_signo, info->si_code))) { in post_copy_siginfo_from_user()
3432 static int do_sigtimedwait(const sigset_t *which, kernel_siginfo_t *info, in do_sigtimedwait() argument
3454 sig = dequeue_signal(tsk, &mask, info); in do_sigtimedwait()
3473 sig = dequeue_signal(tsk, &mask, info); in do_sigtimedwait()
3497 kernel_siginfo_t info; in SYSCALL_DEFINE4() local
3512 ret = do_sigtimedwait(&these, &info, uts ? &ts : NULL); in SYSCALL_DEFINE4()
3515 if (copy_siginfo_to_user(uinfo, &info)) in SYSCALL_DEFINE4()
3530 kernel_siginfo_t info; in SYSCALL_DEFINE4() local
3544 ret = do_sigtimedwait(&these, &info, uts ? &ts : NULL); in SYSCALL_DEFINE4()
3547 if (copy_siginfo_to_user(uinfo, &info)) in SYSCALL_DEFINE4()
3562 kernel_siginfo_t info; in COMPAT_SYSCALL_DEFINE4() local
3576 ret = do_sigtimedwait(&s, &info, uts ? &t : NULL); in COMPAT_SYSCALL_DEFINE4()
3579 if (copy_siginfo_to_user32(uinfo, &info)) in COMPAT_SYSCALL_DEFINE4()
3593 kernel_siginfo_t info; in COMPAT_SYSCALL_DEFINE4() local
3607 ret = do_sigtimedwait(&s, &info, uts ? &t : NULL); in COMPAT_SYSCALL_DEFINE4()
3610 if (copy_siginfo_to_user32(uinfo, &info)) in COMPAT_SYSCALL_DEFINE4()
3619 static inline void prepare_kill_siginfo(int sig, struct kernel_siginfo *info) in prepare_kill_siginfo() argument
3621 clear_siginfo(info); in prepare_kill_siginfo()
3622 info->si_signo = sig; in prepare_kill_siginfo()
3623 info->si_errno = 0; in prepare_kill_siginfo()
3624 info->si_code = SI_USER; in prepare_kill_siginfo()
3625 info->si_pid = task_tgid_vnr(current); in prepare_kill_siginfo()
3626 info->si_uid = from_kuid_munged(current_user_ns(), current_uid()); in prepare_kill_siginfo()
3636 struct kernel_siginfo info; in SYSCALL_DEFINE2() local
3638 prepare_kill_siginfo(sig, &info); in SYSCALL_DEFINE2()
3640 return kill_something_info(sig, &info, pid); in SYSCALL_DEFINE2()
3664 static int copy_siginfo_from_user_any(kernel_siginfo_t *kinfo, siginfo_t *info) in copy_siginfo_from_user_any() argument
3674 kinfo, (struct compat_siginfo __user *)info); in copy_siginfo_from_user_any()
3676 return copy_siginfo_from_user(kinfo, info); in copy_siginfo_from_user_any()
3709 siginfo_t __user *, info, unsigned int, flags) in SYSCALL_DEFINE4() argument
3735 if (info) { in SYSCALL_DEFINE4()
3736 ret = copy_siginfo_from_user_any(&kinfo, info); in SYSCALL_DEFINE4()
3761 do_send_specific(pid_t tgid, pid_t pid, int sig, struct kernel_siginfo *info) in do_send_specific() argument
3769 error = check_kill_permission(sig, info, p); in do_send_specific()
3775 error = do_send_sig_info(sig, info, p, PIDTYPE_PID); in do_send_specific()
3792 struct kernel_siginfo info; in do_tkill() local
3794 clear_siginfo(&info); in do_tkill()
3795 info.si_signo = sig; in do_tkill()
3796 info.si_errno = 0; in do_tkill()
3797 info.si_code = SI_TKILL; in do_tkill()
3798 info.si_pid = task_tgid_vnr(current); in do_tkill()
3799 info.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in do_tkill()
3801 return do_send_specific(tgid, pid, sig, &info); in do_tkill()
3839 static int do_rt_sigqueueinfo(pid_t pid, int sig, kernel_siginfo_t *info) in do_rt_sigqueueinfo() argument
3844 if ((info->si_code >= 0 || info->si_code == SI_TKILL) && in do_rt_sigqueueinfo()
3849 return kill_proc_info(sig, info, pid); in do_rt_sigqueueinfo()
3861 kernel_siginfo_t info; in SYSCALL_DEFINE3() local
3862 int ret = __copy_siginfo_from_user(sig, &info, uinfo); in SYSCALL_DEFINE3()
3865 return do_rt_sigqueueinfo(pid, sig, &info); in SYSCALL_DEFINE3()
3874 kernel_siginfo_t info; in COMPAT_SYSCALL_DEFINE3() local
3875 int ret = __copy_siginfo_from_user32(sig, &info, uinfo); in COMPAT_SYSCALL_DEFINE3()
3878 return do_rt_sigqueueinfo(pid, sig, &info); in COMPAT_SYSCALL_DEFINE3()
3882 static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, kernel_siginfo_t *info) in do_rt_tgsigqueueinfo() argument
3891 if ((info->si_code >= 0 || info->si_code == SI_TKILL) && in do_rt_tgsigqueueinfo()
3895 return do_send_specific(tgid, pid, sig, info); in do_rt_tgsigqueueinfo()
3901 kernel_siginfo_t info; in SYSCALL_DEFINE4() local
3902 int ret = __copy_siginfo_from_user(sig, &info, uinfo); in SYSCALL_DEFINE4()
3905 return do_rt_tgsigqueueinfo(tgid, pid, sig, &info); in SYSCALL_DEFINE4()
3915 kernel_siginfo_t info; in COMPAT_SYSCALL_DEFINE4() local
3916 int ret = __copy_siginfo_from_user32(sig, &info, uinfo); in COMPAT_SYSCALL_DEFINE4()
3919 return do_rt_tgsigqueueinfo(tgid, pid, sig, &info); in COMPAT_SYSCALL_DEFINE4()