Commit 1302e35
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: a98392b ("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]>1 parent 3fd7c36 commit 1302e35
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2702 | 2702 | | |
2703 | 2703 | | |
2704 | 2704 | | |
| 2705 | + | |
2705 | 2706 | | |
2706 | 2707 | | |
2707 | 2708 | | |
| |||
2717 | 2718 | | |
2718 | 2719 | | |
2719 | 2720 | | |
2720 | | - | |
2721 | | - | |
| 2721 | + | |
| 2722 | + | |
2722 | 2723 | | |
2723 | 2724 | | |
2724 | 2725 | | |
| |||
0 commit comments