All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>,
	Alexei Starovoitov <ast@kernel.org>,
	 Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kumar Kartikeya Dwivedi	 <memxor@gmail.com>,
	Quentin Monnet <qmo@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v1 1/4] selftests/bpf: NUL-terminate bpftool command output
Date: Thu, 20 Aug 2026 11:43:34 -0700	[thread overview]
Message-ID: <fefe5b3af230f51a30f3f77c313452eca81aef9f.camel@gmail.com> (raw)
In-Reply-To: <20260820000627.3826188-2-ihor.solodrai@linux.dev>

On Wed, 2026-08-19 at 17:06 -0700, Ihor Solodrai wrote:
> run_command() writes a bpftool command's output into a caller-supplied
> buffer, and every caller treats that buffer as a C string.
> 
> However fread() reports a byte count and doesn't terminate the
> string. The helper does not terminate either, so callers have to zero
> the buffer first. prog_tests/bpftool_metadata.c does not, for example.
> 
> Read one byte less and terminate in the helper.
> 
> Fixes: f21fae577446 ("selftests/bpf: Add a few helpers for bpftool testing")
> Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> ---

Acked-by: Eduard Zingerman <eddyz87@gmail.com>

...

  reply	other threads:[~2026-08-20 18:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  0:06 [PATCH bpf-next v1 0/4] bpftool, selftests: Add tests for C dump and fix a dropped type Ihor Solodrai
2026-08-20  0:06 ` [PATCH bpf-next v1 1/4] selftests/bpf: NUL-terminate bpftool command output Ihor Solodrai
2026-08-20 18:43   ` Eduard Zingerman [this message]
2026-08-20  0:06 ` [PATCH bpf-next v1 2/4] selftests/bpf: Add tests for bpftool btf dump format c Ihor Solodrai
2026-08-20  0:16   ` sashiko-bot
2026-08-20  0:51   ` bot+bpf-ci
2026-08-20 19:09   ` Eduard Zingerman
2026-08-20 21:01     ` Ihor Solodrai
2026-08-20  0:06 ` [PATCH bpf-next v1 3/4] bpftool: Don't drop a type in the sorted C dump Ihor Solodrai
2026-08-20 20:47   ` Eduard Zingerman
2026-08-21  0:18   ` Andrii Nakryiko
2026-08-20  0:06 ` [PATCH bpf-next v1 4/4] selftests/bpf: Check that sorting preserves types in bpftool dump Ihor Solodrai
2026-08-20 20:42   ` Eduard Zingerman
2026-08-20 20:58     ` Ihor Solodrai
2026-08-20 21:25       ` Eduard Zingerman

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=fefe5b3af230f51a30f3f77c313452eca81aef9f.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=ihor.solodrai@linux.dev \
    --cc=memxor@gmail.com \
    --cc=qmo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.