BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] bpf: Add bpf_vma_build_id_parse helper
@ 2022-11-08 22:20 Jiri Olsa
  2022-11-08 22:20 ` [PATCH bpf-next 1/3] bpf: Split btf_id/size union in struct bpf_func_proto Jiri Olsa
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiri Olsa @ 2022-11-08 22:20 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: bpf, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-09 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 22:20 [PATCH bpf-next 0/3] bpf: Add bpf_vma_build_id_parse helper Jiri Olsa
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox