lkml.org 
[lkml]   [2023]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] perf llvm: Fix inadvertent file creation
Em Thu, Jan 19, 2023 at 07:57:19AM -0800, Ian Rogers escreveu:
> On Thu, Jan 5, 2023 at 12:26 AM Ian Rogers <irogers@google.com> wrote:
> >
> > 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: 5eab5a7ee032 ("perf llvm: Display eBPF compiling command in debug output")
> > Signed-off-by: Ian Rogers <irogers@google.com>
>
> Ping. Not really a BPF/LLVM fix, it is just doing some string
> manipulation to avoid shell interpretation in the context of making
> BPF/LLVM.

Thanks, applied.

- Arnaldo

\
 
 \ /
  Last update: 2023-03-26 23:48    [W:0.030 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site