Skip to content

Implement mechanism to signal other threads

Puranjay Mohan bpf lkml 4 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 0 repliesApplied 2/2
  2. v42 patches 3 repliesSuperseded
  3. v32 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v22 patches6 repliesSuperseded

Changes in v5 from the cover letter

v4: https://lore.kernel.org/all/[email protected]/
- Call copy_siginfo() only if work->has_siginfo is true in bpf_send_signal_common()
- Add Acked-by: Andrii Nakryiko <[email protected]>

Patches in v5 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: implement bpf_send_signal_task() kfunckernel/bpf/helpers.c kernel/trace/bpf_trace.c+46 -80 repliesApplied
2/2selftests/bpf: Augment send_signal test with remote signalingtools/testing/selftests/bpf/prog_tests/send_signal.c tools/testing/selftests/bpf/progs/test_send_signal_kern.c+130 -380 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAndrii Nakryiko
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH bpf-next v5 0/2] 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/[email protected]/
- Call copy_siginfo() only if work->has_siginfo is true in bpf_send_signal_common()
- Add Acked-by: Andrii Nakryiko <[email protected]>

Changes in v4:
v3: https://lore.kernel.org/all/[email protected]/
- 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/[email protected]/
- make the cookie u64 instead of int.
- re use code from bpf_send_signal_common

Changes in v2:
v1: https://lore.kernel.org/bpf/[email protected]/
- Convert to a kfunc
- Add mechanism to send a cookie with the signal.

Puranjay Mohan (2):
bpf: implement bpf_send_signal_task() kfunc selftests/bpf: Augment send_signal test with remote signaling

 kernel/bpf/helpers.c                          |   1 +
 kernel/trace/bpf_trace.c                      |  53 +++++--
 .../selftests/bpf/prog_tests/send_signal.c    | 133 +++++++++++++-----
 .../bpf/progs/test_send_signal_kern.c         |  35 ++++-
 4 files changed, 176 insertions(+), 46 deletions(-)
Signature · 1 line
2.40.1