All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tianyi Chen <hi@tychen.cc>
To: bpf@vger.kernel.org
Cc: qmo@kernel.org, andrii@kernel.org, eddyz87@gmail.com,
	ihor.solodrai@linux.dev, linux-kselftest@vger.kernel.org,
	skokovmaksimevg@gmail.com
Subject: [PATCH bpf-next 0/2] bpftool: Reset map info between queries
Date: Tue, 29 Sep 2026 02:18:43 +0900	[thread overview]
Message-ID: <cover.1790615923.git.hi@tychen.cc> (raw)

Reset map info before each query in the existing show and dump loops
to prevent BTF metadata from a preceding map leaking into a map without
BTF.

Patch 1 fixes the four query loops. Patch 2 adds regression tests for
full and named listings, JSON dumps, and plain dumps.

All four regression subtests fail on the unmodified bpf-next base and
pass with the fix in an x86-64 VM. This series does not depend on
recursive dumping or Maxim's series.

Tianyi Chen (2):
  bpftool: Reset map info before each query in show and dump loops
  selftests/bpf: Check bpftool map info across mixed BTF maps

 tools/bpf/bpftool/map.c                       |   8 ++
 .../bpf/prog_tests/bpftool_map_info.c         | 126 ++++++++++++++++++
 2 files changed, 134 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_info.c


base-commit: ea9358e1270ab2c3ba6f36bd9bdda68617665516
-- 
2.55.0


             reply	other threads:[~2026-09-28 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 17:18 Tianyi Chen [this message]
2026-09-28 17:13 ` [PATCH bpf-next 2/2] selftests/bpf: Check bpftool map info across mixed BTF maps Tianyi Chen
2026-09-29 10:28   ` Quentin Monnet
2026-09-28 17:13 ` [PATCH bpf-next 1/2] bpftool: Reset map info before each query in show and dump loops Tianyi Chen
2026-09-29 10:28   ` 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=cover.1790615923.git.hi@tychen.cc \
    --to=hi@tychen.cc \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=qmo@kernel.org \
    --cc=skokovmaksimevg@gmail.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 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.