Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581406

Re: [PATCH V2 1/2] tracing/probes: Fix a warning message to show correct maximum length

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/2] tracing/probes: Fix a warning message to show correct maximum length
Date 2017-02-15 16:40 +0100
Message-ID <tb9Qt-1LT-19@gated-at.bofh.it> (permalink)
References <t9ehA-xE-7@gated-at.bofh.it> <t9jqW-3TZ-15@gated-at.bofh.it> <t9m5r-5JI-11@gated-at.bofh.it> <tb9x7-1Fk-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 16 Feb 2017 00:10:30 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> On Fri, 10 Feb 2017 11:04:34 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > On Fri, 10 Feb 2017 22:21:55 +0900
> > Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >   
> > > Since tracing/*probe_events will accept a probe definition
> > > up to 4096 - 2 ('\n' and '\0') bytes, it must show 4094 instead
> > > of 4096 in warning message.  
> > 
> > Actually, during the testing I found that we don't need the '\n'.
> > 
> > 	echo -n 'p:irq do_IRQ a=@jiffies_64' > kprobe_events
> > 
> > works just fine. My tests work with 4095 characters. Before and after
> > my patch.  
> 
> Yeah, I see. I concider the case that if the writer writes 
> 4095 chars command + '\n' + next command, it will fail, that
> is what I pointed out below note.
> 
> > > 
> > > Note that there is one possible case of exceed 4094. If user
> > > prepare 4096 bytes null-terminated string and syscall write
> > > it with the count == 4095, then it can be accepted. However,
> > > if user puts a '\n' after that, it must rejected.
> > > So IMHO, the warning message should indicate shorter one,
> > > since it is safer.  
> 
> Thank you,
> 

OK, I'll just add the patch as is.

Thanks,

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V2 1/2] tracing/probes: Fix a warning message to show  correct maximum length Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-15 16:20 +0100
  Re: [PATCH V2 1/2] tracing/probes: Fix a warning message to show  correct maximum length Steven Rostedt <rostedt@goodmis.org> - 2017-02-15 16:40 +0100

csiph-web