From: Francis Laniel <flaniel@linux.microsoft.com>
To: bpf@vger.kernel.org
Cc: Francis Laniel <flaniel@linux.microsoft.com>,
Quentin Monnet <quentin@isovalent.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [RFC PATCH v1 0/1] bpftool: Add generating command to C dumped file.
Date: Tue, 12 Jul 2022 20:42:24 +0200 [thread overview]
Message-ID: <20220712184225.52429-1-flaniel@linux.microsoft.com> (raw)
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
next reply other threads:[~2022-07-12 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 18:42 Francis Laniel [this message]
2022-07-12 18:42 ` [RFC PATCH v1 1/1] bpftool: Add generating command to C dumped file Francis Laniel
2022-07-12 20:47 ` sdf
2022-07-13 13:40 ` Francis Laniel
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=20220712184225.52429-1-flaniel@linux.microsoft.com \
--to=flaniel@linux.microsoft.com \
--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=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--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