[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181206031849.n76w44z4z6rey7qc@ast-mbp.dhcp.thefacebook.com>
Date: Wed, 5 Dec 2018 19:18:50 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Quentin Monnet <quentin.monnet@...ronome.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
oss-drivers@...ronome.com
Subject: Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace
pipe
On Wed, Dec 05, 2018 at 06:15:23PM +0000, Quentin Monnet wrote:
> > > +
> > > + /* Allow room for NULL terminating byte and pipe file name */
> > > + snprintf(format, sizeof(format), "%%*s %%%zds %%99s %%*s %%*d %%*d\\n",
> > > + PATH_MAX - strlen(pipe_name) - 1);
> >
> > before scanning trace_pipe could you add a check that trace_options are compatible?
> > Otherwise there will be a lot of garbage printed.
> > afaik default is rarely changed, so the patch is ok as-is.
> > The followup some time in the future would be perfect.
>
> Sure. What do you mean exactly by compatible options? I can check that
> "trace_printk" is set, is there any other option that would be relevant?
See Documentation/trace/ftrace.rst
a lot of the flags will change the format significantly.
Like 'bin' will make it binary.
I'm not suggesting to support all possible output formats.
Only to check that trace flags match scanf.
Powered by blists - more mailing lists