Re: [PATCH bpf-next v5 03/14] bpf: Add verifier diagnostic event log

[email protected]
Newsgroups org.kernel.vger.bpf
Message-ID <d24c1c5cba46c2f647f7852831895e228259a6123daf5ce820eb9c11c5e070da@mail.kernel.org>
> bpf: Add verifier diagnostic event log
>
> Add an environment-owned diagnostic history for verifier reports. Event
> payloads keep the user-facing branch history shape, while storage lives
> in bpf_verifier_env and follows the active verifier path.
>
> Grow the event array geometrically up to a 64 MiB limit. Once storage
> reaches the limit, or an allocation fails, overwrite the oldest event so
> diagnostics retain the newest useful suffix without adding per-event
> metadata.
>
> Represent saved positions as absolute logical sequence numbers. A restore
> truncates to a retained position. If its prefix has already been evicted,
> clear the abandoned suffix and preserve the missing-history position. This
> keeps marks stable across rotation without increasing their size.
>
> Add the branch event renderer and branch recording.
>
> Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>

The changelog states "Add the branch event renderer and branch recording"
but this commit only adds the recording half.

The commit adds enum bpf_diag_history_kind/BPF_DIAG_HISTORY_BRANCH, struct
bpf_diag_history_event, the ring storage, diag_append_history() and
bpf_diag_record_branch(), plus the do_check() call site, but nothing
anywhere in the tree reads log->events at this commit.

Looking at bpf_diag_record_branch() in kernel/bpf/diagnostics.c, it stores
event->branch.cond_true and the instruction index, but no code in this
commit consumes the branch events to produce formatted output.

Should the commit message reference only the recording functionality added
here, with the renderer coming in a later commit?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/31870608176
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.