Commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") added helper bpf_send_signal() which permits bpf program to send a signal to the current process. This patch implemented a new helper bpf_send_signal_thread() to send a signal to the current thread. This helper can simplify user space code if the thread context of bpf sending signal is needed in user space. Please see Patch #1 for details of use case and kernel implementation. Patch #2 added some bpf self tests for the new helper. Yonghong Song (2): bpf: add bpf_send_signal_thread() helper tools/bpf: add a selftest for bpf_send_signal_thread() include/uapi/linux/bpf.h | 18 +++++++++-- kernel/trace/bpf_trace.c | 27 +++++++++++++++-- tools/include/uapi/linux/bpf.h | 18 +++++++++-- .../selftests/bpf/prog_tests/send_signal.c | 30 ++++++++++++------- .../bpf/progs/test_send_signal_kern.c | 9 ++++-- 5 files changed, 82 insertions(+), 20 deletions(-) -- 2.17.1