diff options
author | Christian Brauner <brauner@kernel.org> | 2024-02-09 15:49:45 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-21 09:46:08 +0100 |
commit | e1fb1dc08e73466830612bcf2f9f72180965c9ba (patch) | |
tree | b39e0470adfe3fc531c064f14cc60601b5af6a6d /fs/Makefile | |
parent | 81b9d8ac0640b285a3c369cd41a85f6c240d3a60 (diff) | |
download | linux-stable-e1fb1dc08e73466830612bcf2f9f72180965c9ba.tar.gz linux-stable-e1fb1dc08e73466830612bcf2f9f72180965c9ba.tar.bz2 linux-stable-e1fb1dc08e73466830612bcf2f9f72180965c9ba.zip |
pidfd: allow to override signal scope in pidfd_send_signal()
Right now we determine the scope of the signal based on the type of
pidfd. There are use-cases where it's useful to override the scope of
the signal. For example in [1]. Add flags to determine the scope of the
signal:
(1) PIDFD_SIGNAL_THREAD: send signal to specific thread reference by @pidfd
(2) PIDFD_SIGNAL_THREAD_GROUP: send signal to thread-group of @pidfd
(2) PIDFD_SIGNAL_PROCESS_GROUP: send signal to process-group of @pidfd
Since we now allow specifying PIDFD_SEND_PROCESS_GROUP for
pidfd_send_signal() to send signals to process groups we need to adjust
the check restricting si_code emulation by userspace to account for
PIDTYPE_PGID.
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Link: https://github.com/systemd/systemd/issues/31093 [1]
Link: https://lore.kernel.org/r/20240210-chihuahua-hinzog-3945b6abd44a@brauner
Link: https://lore.kernel.org/r/20240214123655.GB16265@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/Makefile')
0 files changed, 0 insertions, 0 deletions