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:	Wed, 29 Apr 2009 11:56:25 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 5/5] ring-buffer: fix printk output


* Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Wed, 29 Apr 2009 09:22:08 +0200 Ingo Molnar <mingo@...e.hu> wrote:
> 
> > 
> > * Andrew Morton <akpm@...ux-foundation.org> wrote:
> > 
> > > On Wed, 29 Apr 2009 08:09:55 +0200 Ingo Molnar <mingo@...e.hu> wrote:
> > > 
> > > > 
> > > > * Andrew Morton <akpm@...ux-foundation.org> wrote:
> > > > 
> > > > > On Wed, 29 Apr 2009 07:43:59 +0200 Ingo Molnar <mingo@...e.hu> wrote:
> > > > > 
> > > > > > 
> > > > > > * Andrew Morton <akpm@...ux-foundation.org> wrote:
> > > > > > 
> > > > > > > On Wed, 29 Apr 2009 00:48:19 -0400 Steven Rostedt <rostedt@...dmis.org> wrote:
> > > > > > > 
> > > > > > > > -	printk_once(KERN_WARNING "Tracing recursion: depth[%d]:"
> > > > > > > > +	printk_once(KERN_WARNING "Tracing recursion: depth[%ld]:"
> > > > > > > 
> > > > > > > hrmph.  I didn't know that printk_once() existed, and I should 
> > > > > > > have known.  I wonder how many other people don't know.
> > > > > > 
> > > > > > Was posted to linux-next@...r.kernel.org.
> > > > > 
> > > > > Well no wonder I didn't know about it.
> > > > 
> > > > I (too?) think it's counter-productive that the linux-next list is 
> > > > split out of lkml. I constantly fall into that trap: i get a 
> > > > bugreport against one of our trees, i see that there's vger in the 
> > > > Cc: list and mistake it for being Cc:-ed to lkml (all our trees are 
> > > > developed on lkml and most of the bugreports come Cc:-ed to lkml) 
> > > > but in reality it's Cc:-ed to linux-next which has a much smaller 
> > > > audience. (which audience apparently does not even include you)
> > > > 
> > > > If this email list fragmentation and the resoluting loss of 
> > > > information bothers you too then please ask Stephen to move 
> > > > linux-next mails to lkml (i've Cc:-ed Stephen) - it's not like it's 
> > > > actually something separate ... today's linux-next messages are 
> > > > tomorrow's lkml messages. Moving linux-next mails to lkml would 
> > > > nicely improve the S/N ratio on lkml.
> > > > 
> > > 
> > > eh.  Just auto-add lkml to tipbot-commit emails?
> > 
> > Yeah - the tip-commits-bot already has such a feature and we are 
> > making use of it - but this commit predates it. So it was posted 
> > to linux-next and the tip-commits list.
> 
> there's a tip-commits list?

has been for months, see:

   http://vger.kernel.org/vger-lists.html
   http://vger.kernel.org/vger-lists.html#linux-tip-commits

> > My larger point remains, about possibly embedding linux-next 
> > into lkml. I couldnt think of a single linux-next mail that isnt 
> > relevant to lkml. It's all about commits that are destined for 
> > upstream in 0-2.5 months.
> 
> Sure, I'd be OK with zapping the linux-next list.

Another, less drastic solution would be to keep it as an _alias_ 
list. All mails posted to it also go to lkml, but it would still be 
subscribe-able separately.

( This has come up before and this would be useful for a number of 
  other things - such as tracing/instrumentation. Someone who is 
  only interested in instrumentation related discussions could 
  subscribe to that list. )

> > > printk_once() is racy on smp and preempt btw ;)
> > 
> > Like WARN_ONCE() and WARN_ON_ONCE(). It's really an "oh crap" 
> > facility, not for normal kernel messages.
> > 
> > Do we want to complicate them with locking and preemption - or 
> > should we just concentrate on getting the "oh crap" message out 
> > to the syslog (before it's possibly too late to get anything 
> > out)?
> > 
> > I have no strong opinion about it - but i tend to like the 
> > simpler method most. printk + stack dumps themselves arent 
> > atomic to begin with.
> 
> Well, it's hardly likely to be a problem.  otoh, if two CPUs _do_ 
> hit the thing at the same time, the resulting output will be all 
> messed up and we'd really like to see it.
> 
> Easily fixed with test_and_set_bit()?

but if two CPUs hit it at once then the printk+stack-dump itself is 
already mixed up. So if we do any atomicity it should be done for 
all the print-once APIs. (note, lockdep does such message-atomicity 
already, in its own facility)

	Ingo
--
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