aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorBenjamin Peterson <[email protected]>2024-11-07 23:21:27 +0000
committerArnaldo Carvalho de Melo <[email protected]>2024-11-14 18:06:52 -0300
commit1302e352b26f34991b619b5d0b621b76d20a3883 (patch)
tree837a92286e2639d02cfd47e3644504ba0f5f5b3e /tools/perf/scripts/python/check-perf-trace.py
parent3fd7c36973a250e17a4ee305a31545a9426021f4 (diff)
perf trace: Avoid garbage when not printing a syscall's arguments
syscall__scnprintf_args may not place anything in the output buffer (e.g., because the arguments are all zero). If that happened in trace__fprintf_sys_enter, its fprintf would receive an unitialized buffer leading to garbage output. Fix the problem by passing the (possibly zero) bounds of the argument buffer to the output fprintf. Fixes: a98392bb1e169a04 ("perf trace: Use beautifiers on syscalls:sys_enter_ handlers") Signed-off-by: Benjamin Peterson <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Tested-by: Howard Chu <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions