From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 0/2] bpf: add bpf_send_signal_thread() helper
Date: Thu, 9 Jan 2020 17:15:57 -0800 [thread overview]
Message-ID: <20200110011557.1949757-1-yhs@fb.com> (raw)
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
next reply other threads:[~2020-01-10 1:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 1:15 Yonghong Song [this message]
2020-01-10 1:15 ` [PATCH bpf-next 1/2] bpf: add bpf_send_signal_thread() helper Yonghong Song
2020-01-14 0:58 ` Andrii Nakryiko
2020-01-14 1:15 ` Yonghong Song
2020-01-10 1:15 ` [PATCH bpf-next 2/2] tools/bpf: add a selftest for bpf_send_signal_thread() Yonghong Song
2020-01-14 1:19 ` Andrii Nakryiko
2020-01-14 1:22 ` Yonghong Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200110011557.1949757-1-yhs@fb.com \
--to=yhs@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).