summaryrefslogtreecommitdiff
path: root/kernel/seccomp.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2019-05-15 22:23:32 -0500
committerEric W. Biederman <ebiederm@xmission.com>2019-05-29 09:31:43 -0500
commit8ad23dea808042ffb8bb1b45111af6ddc1bac5d3 (patch)
tree50c585c6013522be312e9d3fefa1eb4592b8b0aa /kernel/seccomp.c
parent8917bef336f5301edd616cfa97b97d0319fd0496 (diff)
signal: Move the computation of force into send_signal and correct it.
Forcing a signal or not allowing a pid namespace init to ignore SIGKILL or SIGSTOP is more cleanly computed in send_signal. There are two cases where we don't allow a pid namespace init to ignore SIGKILL or SIGSTOP. If the sending process is from an ancestor pid namespace and as such is effectively the god to the target process, and if the it is the kernel that is sending the signal, not another application. It is known that a process is from an ancestor pid namespace if it can see it's target but it's target does not have a pid for the sender in it's pid namespace. It is know that a signal is sent from the kernel if si_code is set to SI_KERNEL or info is SEND_SIG_PRIV (which ultimately generates a signal with si_code == SI_KERNEL). The only signals that matter are SIGKILL and SIGSTOP neither of which can really be caught, and both of which always have a siginfo layout that includes si_uid and si_pid. Therefore we never need to worry about forcing a signal when si_pid and si_uid are absent. So handle the two special cases of info and the case when si_pid and si_uid are present. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/seccomp.c')
0 files changed, 0 insertions, 0 deletions