]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Implement bpf_send_signal_task() kfunc
authorPuranjay Mohan <puranjay@kernel.org>
Wed, 16 Oct 2024 08:41:35 +0000 (08:41 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 21 Oct 2024 22:02:49 +0000 (15:02 -0700)
commit6280cf718db0c557b5fe44e2d2e8ad8e832696a7
tree7622100363c4b50f66ed40ff4606e61ab46db016
parent8ca77b8f6223e92c9cf28ccbac54291d6e97dae1
bpf: Implement bpf_send_signal_task() kfunc

Implement bpf_send_signal_task kfunc that is similar to
bpf_send_signal_thread and bpf_send_signal helpers  but can be used to
send signals to other threads and processes. It also supports sending a
cookie with the signal similar to sigqueue().

If the receiving process establishes a handler for the signal using the
SA_SIGINFO flag to sigaction(), then it can obtain this cookie via the
si_value field of the siginfo_t structure passed as the second argument
to the handler.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241016084136.10305-2-puranjay@kernel.org
kernel/bpf/helpers.c
kernel/trace/bpf_trace.c