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]
Message-ID: <20160629114234.1523d7dd@gandalf.local.home>
Date:	Wed, 29 Jun 2016 11:42:34 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Jiri Olsa <jolsa@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [RFC/PATCH] lib/vsprintf: Add support to store cpumask

On Wed, 29 Jun 2016 08:43:48 +0200
Jiri Olsa <jolsa@...hat.com> wrote:

> 
> > diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> > index 94aa10ffe156..62693900cc4b 100644
> > --- a/include/linux/kernel.h
> > +++ b/include/linux/kernel.h
> > @@ -631,7 +631,24 @@ do {									\
> >  									\
> >  	__trace_printk_check_format(fmt, ##args);			\
> >  									\
> > -	if (__builtin_constant_p(fmt))					\
> > +	if (__builtin_constant_p(fmt) &&				\
> > +	    !__builtin_strstr(fmt, "%pF") &&				\
> > +	    !__builtin_strstr(fmt, "%pf") &&				\
> > +	    !__builtin_strstr(fmt, "%pR") &&				\
> > +	    !__builtin_strstr(fmt, "%pr") &&				\
> > +	    !__builtin_strstr(fmt, "%pb") &&				\
> > +	    !__builtin_strstr(fmt, "%pM") &&				\
> > +	    !__builtin_strstr(fmt, "%pI") &&				\
> > +	    !__builtin_strstr(fmt, "%pE") &&				\
> > +	    !__builtin_strstr(fmt, "%pU") &&				\
> > +	    !__builtin_strstr(fmt, "%pV") &&				\
> > +	    !__builtin_strstr(fmt, "%pN") &&				\
> > +	    !__builtin_strstr(fmt, "%pa") &&				\
> > +	    !__builtin_strstr(fmt, "%pd") &&				\
> > +	    !__builtin_strstr(fmt, "%pC") &&				\
> > +	    !__builtin_strstr(fmt, "%pD") &&				\
> > +	    !__builtin_strstr(fmt, "%pg") &&				\
> > +	    !__builtin_strstr(fmt, "%pG"))				\
> >  		__trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args);	\
> >  	else								\
> >  		__trace_printk(_THIS_IP_, fmt, ##args);			\  
> 
> is this one working? it seems better to me than adding new trace_printk_ptr

The problem with this is that it would require a bunch more conditions
as you see it would not have helped your own use case (requiring the *p)

I'm actually looking into extending your patch to handle all cases that
vbin_printf() is an issue.

Thinking about it more, as vbin_printf() is a two part process, it
should by default not depend on any dereferencing, as I can't think of
any use case for it where it wouldn't be an issue.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ