lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 7 Feb 2017 20:02:40 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Subject: Re: [PATCH tip/master] tracing/probes: Fix a warning message to
 show correct maximum length

On Tue, 7 Feb 2017 08:41:48 +0100
Ingo Molnar <mingo@...nel.org> wrote:

> 
> * Masami Hiramatsu <mhiramat@...nel.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.
> > 
> > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > ---
> >  kernel/trace/trace_probe.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> > index 8c0553d..7138fea 100644
> > --- a/kernel/trace/trace_probe.c
> > +++ b/kernel/trace/trace_probe.c
> > @@ -673,8 +673,9 @@ ssize_t traceprobe_probes_write(struct file *file, const char __user *buffer,
> >  			*tmp = '\0';
> >  			size = tmp - kbuf + 1;
> >  		} else if (done + size < count) {
> > +			/* This can accept WRITE_BUFSIZE - 2 ('\n' + '\0') */
> >  			pr_warn("Line length is too long: Should be less than %d\n",
> > -				WRITE_BUFSIZE);
> > +				WRITE_BUFSIZE - 2);
> 
> The message should also indicate which kernel subsystem generated it - which is 
> useful if the message is not immediately noticed in the kernel log.
> 
> You can do this by having something like this at the top of the trace_probe file:
> 
>   #define pr_fmt(fmt) "trace_probe: " fmt

Ah, I got it. I'll make a separate patch for that.

Thank you!

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ