diff options
| author | Kees Cook <kees@kernel.org> | 2026-10-05 08:56:58 -0700 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-10-11 21:57:29 -0700 |
| commit | c8cd1725d259b31b5bfa362696985deb8c9a8039 (patch) | |
| tree | 8cf712106ba3a7d02b4c99e04eb5c8c56f39cfb5 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 88c652df02ccf9e7644c012f8375fec24d848be3 (diff) | |
| download | linux-next-c8cd1725d259b31b5bfa362696985deb8c9a8039.tar.gz linux-next-c8cd1725d259b31b5bfa362696985deb8c9a8039.zip | |
bpf: Remove dead newline stripping from format_disasm_line()
format_disasm_line() strips trailing newlines from the disassembly it
stores, as diag_print_insn_context() adds its own. Since
commit 483a1bb0b6cf8 ("bpf: Do not print a newline after disassembly in
bpf_verbose_insn()"), print_bpf_insn() does not emit one, so there is
nothing left to strip.
The strnlen() resync of the seq_buf length only existed so the loop
could index the buffer safely after an overflow, and the second
termination only restored the NUL that seq_buf_pop() does not write.
Remove all of it, keeping a single seq_buf_terminate().
Build tested ARCH=x86_64 defconfig with GCC 16.2.0 and
CONFIG_BPF_SYSCALL=y.
Assisted-by: LLM
Acked-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261005155708.1471260-8-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
