summaryrefslogtreecommitdiff
path: root/kernel/bpf/helpers.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-10-21 15:02:49 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-10-21 15:02:50 -0700
commitd39100d01ce1ba1bffe0447a0550f592aa6e1e9b (patch)
treed77b5782e22dc705ddec5bccce32e86274d88713 /kernel/bpf/helpers.c
parent8ca77b8f6223e92c9cf28ccbac54291d6e97dae1 (diff)
parent0e14189459f6c424a95a146d288d59f0ed27fd3f (diff)
Merge branch 'implement-mechanism-to-signal-other-threads'
Puranjay Mohan says: ==================== Implement mechanism to signal other threads This set implements a kfunc called bpf_send_signal_task() that is similar to sigqueue() as it can send a signal along with a cookie to a thread or thread group. The send_signal selftest has been updated to also test this new kfunc under all contexts. Changes in v5: v4: https://lore.kernel.org/all/20241008114940.44305-1-puranjay@kernel.org/ - Call copy_siginfo() only if work->has_siginfo is true in bpf_send_signal_common() - Add Acked-by: Andrii Nakryiko <andrii@kernel.org> Changes in v4: v3: https://lore.kernel.org/all/20241007103426.128923-1-puranjay@kernel.org/ - Fix the selftest to make it work for big-endian archs. - Fix a build warning on 32-bit archs. - Some style changes and code refactors suggested by Andrii Changes in v3: v2: https://lore.kernel.org/all/20240926115328.105634-1-puranjay@kernel.org/ - make the cookie u64 instead of int. - re use code from bpf_send_signal_common Changes in v2: v1: https://lore.kernel.org/bpf/20240724113944.75977-1-puranjay@kernel.org/ - Convert to a kfunc - Add mechanism to send a cookie with the signal. ==================== Link: https://lore.kernel.org/r/20241016084136.10305-1-puranjay@kernel.org Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'kernel/bpf/helpers.c')
-rw-r--r--kernel/bpf/helpers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index 073e6f04f4d7..5c3fdb29c1b1 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -3055,6 +3055,7 @@ BTF_ID_FLAGS(func, bpf_task_get_cgroup1, KF_ACQUIRE | KF_RCU | KF_RET_NULL)
BTF_ID_FLAGS(func, bpf_task_from_pid, KF_ACQUIRE | KF_RET_NULL)
BTF_ID_FLAGS(func, bpf_task_from_vpid, KF_ACQUIRE | KF_RET_NULL)
BTF_ID_FLAGS(func, bpf_throw)
+BTF_ID_FLAGS(func, bpf_send_signal_task, KF_TRUSTED_ARGS)
BTF_KFUNCS_END(generic_btf_ids)
static const struct btf_kfunc_id_set generic_kfunc_set = {