[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fUyDUV_XzaTKF4V5h5yzkqtM27AfK2qRTncQiAryHHYcg@mail.gmail.com>
Date: Thu, 5 Oct 2023 15:03:12 -0700
From: Ian Rogers <irogers@...gle.com>
To: Quentin Monnet <quentin@...valent.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/2] bpftool: Align bpf_load_and_run_opts insns and data
On Thu, Oct 5, 2023 at 8:54 AM Quentin Monnet <quentin@...valent.com> wrote:
>
> 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@...gle.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@...valent.com>
Thanks! Nit fixed in v5.
Ian
Powered by blists - more mailing lists