diff options
| author | Kees Cook <kees@kernel.org> | 2026-10-05 08:57:00 -0700 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-10-11 21:57:30 -0700 |
| commit | 63ae65caa98a20191c182b5c9c5d8505c9800584 (patch) | |
| tree | 7e7f64e662f978fd8805bb473241a487151b5da9 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 61ef3f1490f879ddffe39a8f1a1bf1ae1e60fc23 (diff) | |
| download | linux-next-63ae65caa98a20191c182b5c9c5d8505c9800584.tar.gz linux-next-63ae65caa98a20191c182b5c9c5d8505c9800584.zip | |
powerpc/papr_scm: Return the string length from the sysfs show functions
perf_stats_show() and flags_show() build their output with a seq_buf
and return seq_buf_used(), which may include the trailing NUL byte
when the seq_buf has overflowed. Use seq_buf_strlen() instead. As
suggested in review, use it as well for flags_show()'s check whether
any flag was printed.
Build tested ARCH=powerpc ppc64_defconfig with GCC powerpc64-linux-gnu
16.2.0:
arch/powerpc/platforms/pseries/papr_scm.o
Assisted-by: LLM
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20261005155708.1471260-10-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
