From: Alexei Starovoitov <ast@kernel.org>
To: <davem@davemloft.net>
Cc: <daniel@iogearbox.net>, <netdev@vger.kernel.org>,
<bpf@vger.kernel.org>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 0/2] bpf: cleanup BTF-enabled raw_tp
Date: Wed, 30 Oct 2019 12:35:30 -0700 [thread overview]
Message-ID: <20191030193532.262014-1-ast@kernel.org> (raw)
When BTF-enabled raw_tp were introduced the plan was to follow up
with BTF-enabled kprobe and kretprobe reusing PROG_RAW_TRACEPOINT
and PROG_KPROBE types. But k[ret]probe expect pt_regs while
BTF-enabled program ctx will be the same as raw_tp.
kretprobe is indistinguishable from kprobe while BTF-enabled
kretprobe will have access to retval while kprobe will not.
Hence PROG_KPROBE type is not reusable and reusing
PROG_RAW_TRACEPOINT no longer fits well.
Hence introduce 'umbrella' prog type BPF_PROG_TYPE_TRACING
that will cover different BTF-enabled tracing attach points.
The changes make libbpf side cleaner as well.
check_attach_btf_id() is cleaner too.
Alexei Starovoitov (2):
bpf: replace prog_raw_tp+btf_id with prog_tracing
libbpf: add support for prog_tracing
include/linux/bpf.h | 5 ++
include/linux/bpf_types.h | 1 +
include/uapi/linux/bpf.h | 2 +
kernel/bpf/syscall.c | 6 +--
kernel/bpf/verifier.c | 34 +++++++++----
kernel/trace/bpf_trace.c | 44 +++++++++++++----
tools/include/uapi/linux/bpf.h | 2 +
tools/lib/bpf/bpf.c | 8 ++--
tools/lib/bpf/bpf.h | 5 +-
tools/lib/bpf/libbpf.c | 88 +++++++++++++++++++++++++---------
tools/lib/bpf/libbpf.h | 4 ++
tools/lib/bpf/libbpf_probes.c | 1 +
12 files changed, 151 insertions(+), 49 deletions(-)
--
2.17.1
next reply other threads:[~2019-10-30 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 19:35 Alexei Starovoitov [this message]
2019-10-30 19:35 ` [PATCH bpf-next 1/2] bpf: replace prog_raw_tp+btf_id with prog_tracing Alexei Starovoitov
2019-10-30 22:02 ` Andrii Nakryiko
2019-10-30 19:35 ` [PATCH bpf-next 2/2] libbpf: add support for prog_tracing Alexei Starovoitov
2019-10-30 22:02 ` Andrii Nakryiko
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=20191030193532.262014-1-ast@kernel.org \
--to=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.