summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2026-10-05 08:57:01 -0700
committerKees Cook <kees@kernel.org>2026-10-11 21:57:30 -0700
commit9ac219976ecfd0ad9c54050ed14f1da5d197cb69 (patch)
tree422eb294eceb252fd23293439d3ffdfbab4ad11f /tools/perf/scripts/python
parent63ae65caa98a20191c182b5c9c5d8505c9800584 (diff)
downloadlinux-next-9ac219976ecfd0ad9c54050ed14f1da5d197cb69.tar.gz
linux-next-9ac219976ecfd0ad9c54050ed14f1da5d197cb69.zip
nvdimm: ndtest: Return the string length from flags_show()
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. The flag names are far shorter than the PAGE_SIZE buffer sysfs provides, so this cannot overflow today. Build tested ARCH=x86_64 with GCC 16.2.0, built out of tree with make M=tools/testing/nvdimm: tools/testing/nvdimm/test/ndtest.o Assisted-by: LLM Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20261005155708.1471260-11-kees@kernel.org Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions