From: Quentin Monnet <quentin@isovalent.com>
To: Ian Rogers <irogers@google.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 <yonghong.song@linux.dev>,
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>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] bpftool: Align bpf_load_and_run_opts insns and data
Date: Thu, 5 Oct 2023 16:54:04 +0100 [thread overview]
Message-ID: <173829f3-817e-4937-808f-7f9bfc22207f@isovalent.com> (raw)
In-Reply-To: <20231004222323.3503030-2-irogers@google.com>
On 04/10/2023 23:23, Ian Rogers wrote:
> A C string lacks alignment so use aligned arrays to avoid potential
> alignment problems. Switch to using sizeof (less 1 for the \0
> terminator) rather than a hardcode size constant.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/bpf/bpftool/gen.c | 47 ++++++++++++++++++++++-------------------
> 1 file changed, 25 insertions(+), 22 deletions(-)
>
> diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
> index b8ebcee9bc56..7a545dcabe38 100644
> --- a/tools/bpf/bpftool/gen.c
> +++ b/tools/bpf/bpftool/gen.c
> @@ -408,8 +408,8 @@ static void codegen(const char *template, ...)
> /* skip baseline indentation tabs */
> for (n = skip_tabs; n > 0; n--, src++) {
> if (*src != '\t') {
> - p_err("not enough tabs at pos %td in template '%s'",
> - src - template - 1, template);
> + p_err("not enough tabs at pos %td in template '%s'\n'%s'",
> + src - template - 1, template, src);
Nit: This line is no longer aligned with the opening parenthesis.
Other than that:
Acked-by: Quentin Monnet <quenti@isovalent.com>
next prev parent reply other threads:[~2023-10-05 16:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 22:23 [PATCH v4 1/2] bpftool: Align output skeleton ELF code Ian Rogers
2023-10-04 22:23 ` [PATCH v4 2/2] bpftool: Align bpf_load_and_run_opts insns and data Ian Rogers
2023-10-05 15:54 ` Quentin Monnet [this message]
2023-10-05 22:03 ` Ian Rogers
2023-10-05 15:51 ` [PATCH v4 1/2] bpftool: Align output skeleton ELF code Quentin Monnet
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=173829f3-817e-4937-808f-7f9bfc22207f@isovalent.com \
--to=quentin@isovalent.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=irogers@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=sdf@google.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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
all inboxes | Powered by JetHome®