Re: [PATCH bpf-next v4 2/3] selftests/bpf: Adjust veristat stack depth parsing

[email protected] Mon, 3 Aug 2026 08:49:12 +0000 (UTC)
Newsgroups org.kernel.vger.bpf
Message-ID <94b5d9e94c85101e583bb249deb47fd5187d4823fba0f71a03832b1e5b9adb0e@mail.kernel.org>
> selftests/bpf: Adjust veristat stack depth parsing
>
> The verifier now reports stack depth statistics using one record per line.
> Teach veristat to parse the new maximum and per-subprogram records while
> retaining support for the legacy one-line format used by older kernels.
>
> Increase the bounded backward scan so it can include all 256 per-subprogram
> records.
>
> Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>

This isn't a bug, but would it be worth a sentence on the `stack[512] = {}`
initializer? With the new one-record-per-line format the legacy
`stack depth %511s max %ld` branch never fires, so the trailing strtok_r()
loop would otherwise run over an uninitialized buffer - that seems worth
calling out in the changelog rather than leaving it to be inferred from the
diff.


---
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/30794340667