Re: [PATCH bpf-next 1/2] bpftool: Add recursive map dumping

From: Tianyi Chen

Date: Sun Sep 06 2026 - 11:55:07 EST


Thanks for the review. Both issues are fixed in v2:

https://lore.kernel.org/bpf/178870998583.979169.16526173782819097354@xxxxxxxxx/

Per-entry lookup errors now retain the existing error markers and do
not abort the dump. This covers PERF_EVENT_ARRAY, including when it is
an inner map, where element lookup is unsupported.

Traversal now queues deduplicated inner-map IDs and opens, dumps and
closes each inner map in turn. It keeps the selected root FDs open and
requires only one additional map FD. Unchanged outer entries retain
their inner maps. The documentation explains that IDs are resolved when
visited and that concurrent updates mean the dump is not an atomic
snapshot. Failure to open a queued ID still returns an error and closes
the JSON containers.

The series adds four regression subtests: ordinary and nested perf event
arrays, plus JSON and plain dumps of 64 distinct inner maps under
RLIMIT_NOFILE=32. All four fail with v1. All 12 subtests pass with v2 in
a matching-kernel VM, with zero skips. An injected ENOENT at the deferred
inner-map FD lookup also returns failure with parseable JSON.

Best regards,
Tianyi