mbox series

[bpf-next,v5,0/2] Implement mechanism to signal other threads

Message ID 20241016084136.10305-1-puranjay@kernel.org (mailing list archive)
Headers show
Series Implement mechanism to signal other threads | expand

Message

Puranjay Mohan Oct. 16, 2024, 8:41 a.m. UTC
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.

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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 21, 2024, 10:10 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Wed, 16 Oct 2024 08:41:34 +0000 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v5,1/2] bpf: implement bpf_send_signal_task() kfunc
    https://git.kernel.org/bpf/bpf-next/c/6280cf718db0
  - [bpf-next,v5,2/2] selftests/bpf: Augment send_signal test with remote signaling
    https://git.kernel.org/bpf/bpf-next/c/0e14189459f6

You are awesome, thank you!