Re: [PATCH v1] perf llvm: Fix inadvertent file creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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@xxxxxxxxxx>
> 
> 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux