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] [day] [month] [year] [list]
Date:   Tue, 25 Aug 2020 17:39:50 +0200
From:   Vincent Whitchurch <vincent.whitchurch@...s.com>
To:     Steven Rostedt <rostedt@...dmis.org>
CC:     "jbaron@...mai.com" <jbaron@...mai.com>,
        "mingo@...hat.com" <mingo@...hat.com>, kernel <kernel@...s.com>,
        "corbet@....net" <corbet@....net>,
        "pmladek@...e.com" <pmladek@...e.com>,
        "sergey.senozhatsky@...il.com" <sergey.senozhatsky@...il.com>,
        "john.ogness@...utronix.de" <john.ogness@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] dynamic debug: allow printing to trace event

On Fri, Aug 14, 2020 at 07:15:31PM +0200, Steven Rostedt wrote:
> On Fri, 14 Aug 2020 15:31:51 +0200
> Vincent Whitchurch <vincent.whitchurch@...s.com> wrote:
> > index aa9ff9e1c0b3..f599ed21ecc5 100644
> > --- a/include/linux/dynamic_debug.h
> > +++ b/include/linux/dynamic_debug.h
> > @@ -27,13 +27,16 @@ struct _ddebug {
> >  	 * writes commands to <debugfs>/dynamic_debug/control
> >  	 */
> >  #define _DPRINTK_FLAGS_NONE	0
> > -#define _DPRINTK_FLAGS_PRINT	(1<<0) /* printk() a message using the format */
> > +#define _DPRINTK_FLAGS_PRINTK	(1<<0) /* printk() a message using the format */
> 
> The above looks like a cleanup unrelated to this patch, and probably
> should be on its own.

I've moved this and the other renaming hunk out to a separate patch.

> >  #define _DPRINTK_FLAGS_INCL_MODNAME	(1<<1)
> >  #define _DPRINTK_FLAGS_INCL_FUNCNAME	(1<<2)
> >  #define _DPRINTK_FLAGS_INCL_LINENO	(1<<3)
> >  #define _DPRINTK_FLAGS_INCL_TID		(1<<4)
> > +#define _DPRINTK_FLAGS_TRACE		(1<<5)	
> > +#define _DPRINTK_FLAGS_PRINT		(_DPRINTK_FLAGS_PRINTK | \
> > +					 _DPRINTK_FLAGS_TRACE)
> >  #if defined DEBUG
> > -#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT
> > +#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINTK
> >  #else
> >  #define _DPRINTK_FLAGS_DEFAULT 0
> >  #endif
> > diff --git a/include/trace/events/printk.h b/include/trace/events/printk.h
> > index 13d405b2fd8b..6c89121a1669 100644
> > --- a/include/trace/events/printk.h
> > +++ b/include/trace/events/printk.h
> > @@ -7,7 +7,7 @@
> >  
> >  #include <linux/tracepoint.h>
> >  
> > -TRACE_EVENT(console,
> > +DECLARE_EVENT_CLASS(printk,
> >  	TP_PROTO(const char *text, size_t len),
> >  
> >  	TP_ARGS(text, len),
> > @@ -31,6 +31,16 @@ TRACE_EVENT(console,
> >  
> >  	TP_printk("%s", __get_str(msg))
> >  );
> > +
> > +DEFINE_EVENT(printk, console,
> > +	TP_PROTO(const char *text, size_t len),
> > +	TP_ARGS(text, len)
> > +);
> > +
> > +DEFINE_EVENT(printk, dynamic,
> 
> Can we call this "dynamic_printk" or "printk_dynamic", as
> trace_dynamic() is too generic.

I went for "dyndbg" (printk:dyndbg / trace_dyndbg()) which is the
documented name of the infrastructure.

Powered by blists - more mailing lists