From: Jiri Olsa <jolsa@kernel.org>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>
Subject: [PATCH bpf-next 0/3] bpf: Add bpf_vma_build_id_parse helper
Date: Tue, 8 Nov 2022 23:20:24 +0100 [thread overview]
Message-ID: <20221108222027.3409437-1-jolsa@kernel.org> (raw)
hi,
adding bpf_vma_build_id_parse helper that parses build ID of ELF file
mapped vma struct passed as an argument.
I originally wanted to add this as kfunc, but we need to be sure the
receiving buffer is big enough and we can't check for that on kfunc
side.
The use case for this helper is to provide the build id for executed
binaries on kernel side, when the monitoring user side does not have
access to the actual binaries.
thanks,
jirka
---
Jiri Olsa (3):
bpf: Split btf_id/size union in struct bpf_func_proto
bpf: Add bpf_vma_build_id_parse helper
selftests/bpf: Add build_id_parse kfunc test
include/linux/bpf.h | 2 ++
include/uapi/linux/bpf.h | 9 +++++++++
kernel/trace/bpf_trace.c | 22 ++++++++++++++++++++++
scripts/bpf_doc.py | 2 ++
tools/include/uapi/linux/bpf.h | 9 +++++++++
tools/testing/selftests/bpf/prog_tests/vma_build_id_parse.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/testing/selftests/bpf/progs/vma_build_id_parse.c | 34 ++++++++++++++++++++++++++++++++++
7 files changed, 162 insertions(+)
create mode 100644 tools/testing/selftests/bpf/prog_tests/vma_build_id_parse.c
create mode 100644 tools/testing/selftests/bpf/progs/vma_build_id_parse.c
next reply other threads:[~2022-11-08 22:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 22:20 Jiri Olsa [this message]
2022-11-08 22:20 ` [PATCH bpf-next 1/3] bpf: Split btf_id/size union in struct bpf_func_proto Jiri Olsa
2022-11-08 22:20 ` [PATCH bpf-next 2/3] bpf: Add bpf_vma_build_id_parse helper Jiri Olsa
2022-11-09 0:42 ` Alexei Starovoitov
2022-11-09 13:35 ` Jiri Olsa
2022-11-08 22:20 ` [PATCH bpf-next 3/3] selftests/bpf: Add build_id_parse kfunc test Jiri Olsa
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=20221108222027.3409437-1-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=sdf@google.com \
--cc=songliubraving@fb.com \
--cc=yhs@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