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: <20130906091637.665ac0cd@gandalf.local.home>
Date:	Fri, 6 Sep 2013 09:16:37 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Jiri Olsa <jolsa@...hat.com>
Subject: Re: [RFC][PATCH 14/18 v2] ftrace/lockdep: Have the RCU lockdep
 splat show what function triggered

On Fri, 6 Sep 2013 14:57:19 +0200
Ingo Molnar <mingo@...nel.org> wrote:

> 
> * Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> > On Thu, 5 Sep 2013 21:18:39 +0200
> > Peter Zijlstra <peterz@...radead.org> wrote:
> > 
> > > On Sat, Aug 31, 2013 at 01:11:31AM -0400, Steven Rostedt wrote:
> > > > +void print_ftrace_rcu_func(int cpu)
> > > > +{
> > > > +	unsigned long ip = per_cpu(ftrace_rcu_func, cpu);
> > > > +
> > > > +	if (ip)
> > > > +		printk("ftrace_rcu_func: %pS\n",
> > > > +		       (void *)per_cpu(ftrace_rcu_func, cpu));
> > > > +}
> > > 
> > > That's missing { }.
> > 
> > Hmm, that's an interesting point. Why the  { } because I break up the
> > printk for the 80 character limit?
> 
> You probably shouldn't break it up - it looks uglier.

I thought for printk's it was fine to break after the comma, just not
the printk format line. That is,

	printk("ftrace_rcu_func: %pS\n", (void *)per_cpu(ftrace_rcu_func, cpu));

can go to:

	printk("ftrace_rcu_func: %pS\n",
	       (void *)per_cpu(ftrace_rcu_func, cpu));

But

	printk("this is a really long line and it goes on forever and might be too much to break up\n");

can't go to:

	printk("this is a really long line and it goes on forever and"
		" might be too much to break up\n");

> 
> > Although, I'm still not convinced that it needs { }, as it looks to me 
> > that it flows nicely without it. I can't find a place in CodingStyle 
> > that says { } are needed here.
> 
> it's somewhat of a grey area - the section quoted below talks about it 
> broadly - and it's typically understood to apply to multi-line statements 
> as well, as it's easy to overlook and confuse multi-statements with 
> multi-line statements...

Yeah, I read that part too.

Anyway, this conversation is all moot, as the patch is on hold, and we
may have a better way to solve this anyway, making the patch obsolete.

Thanks,

-- Steve



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ