public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/1] bpftool: Add generating command to C dumped file.
@ 2022-07-12 18:42 Francis Laniel
  2022-07-12 18:42 ` [RFC PATCH v1 1/1] " Francis Laniel
  0 siblings, 1 reply; 4+ messages in thread
From: Francis Laniel @ 2022-07-12 18:42 UTC (permalink / raw)
  To: bpf
  Cc: Francis Laniel, Quentin Monnet, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, open list

Hi.


First, I hope you are fine and the same for your relatives.

In this patch, I added the command used to generate a BTF dump at the top of the
dump when outputting to C:
/*
 * File generated by bpftool using:
 * bpftool btf dump file /sys/kernel/btf/vmlinux format c
 * DO NOT EDIT.
 */

The goal of this is to first warn users this file must not be edited and also
to document the command used to get it.
The idea was gathered from a message posted on iovisor/bcc repository and from
message written by bpf2go when it generates a file [1, 2].

This patch is clearly not a big change which impacts the future of bpftool but
I think it could be welcomed.
If you see any way to improve it or have any question, feel free to ask.

Francis Laniel (1):
  bpftool: Add generating command to dumped file.

 tools/bpf/bpftool/btf.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)


Best regards and thank you in advance.
---
[1] https://github.com/iovisor/bcc/pull/4088#pullrequestreview-1032543916
[2] https://github.com/cilium/ebpf/blob/951bb28908d23e50fca063a2d51098ca028352bf/cmd/bpf2go/output.go#L21
-- 
2.25.1


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

end of thread, other threads:[~2022-07-13 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-12 18:42 [RFC PATCH v1 0/1] bpftool: Add generating command to C dumped file Francis Laniel
2022-07-12 18:42 ` [RFC PATCH v1 1/1] " Francis Laniel
2022-07-12 20:47   ` sdf
2022-07-13 13:40     ` Francis Laniel

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