diff options
| author | Ian Rogers <[email protected]> | 2023-01-05 08:26:09 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-01-19 16:23:26 +0000 |
| commit | 9f19aab47ced012eddef1e2bc96007efc7713b61 (patch) | |
| tree | 5d6738b6fee0257864440352e645c8a0e34d64e2 /tools/perf/util/scripting-engines/trace-event-perl.c | |
| parent | perf vendor events intel: Add Emerald Rapids (diff) | |
| download | kernel-9f19aab47ced012eddef1e2bc96007efc7713b61.tar.gz kernel-9f19aab47ced012eddef1e2bc96007efc7713b61.zip | |
perf llvm: Fix inadvertent file creation
The LLVM template is first echo-ed into command_out and then
command_out executed. The echo surrounds the template with double
quotes, however, the template itself may contain quotes. This is
generally innocuous but in tools/perf/tests/bpf-script-test-prologue.c
we see:
...
SEC("func=null_lseek file->f_mode offset orig")
...
where the first double quote ends the double quote of the echo, then
the > redirects output into a file called f_mode.
To avoid this inadvertent behavior substitute redirects and similar
characters to be ASCII control codes, then substitute the output in
the echo back again.
Fixes: 5eab5a7ee032acaa ("perf llvm: Display eBPF compiling command in debug output")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: [email protected]
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: [email protected]
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tom Rix <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions
