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]
Message-ID: <20080917092732.GB32107@elte.hu>
Date:	Wed, 17 Sep 2008 11:27:32 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Yinghai Lu <yhlu.kernel@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	Jason Baron <jbaron@...hat.com>
Subject: Re: [PATCH 0/6] loglevel=pci:8,acpi:8,apic=8 support v6


(Jason Cc:-ed)

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

> On Wed, 17 Sep 2008 01:27:41 -0700 Yinghai Lu <yhlu.kernel@...il.com> wrote:
> 
> >     KERN_PCI
> >     KERN_ACPI
> > v4: fix some checkpatch error and warning
> > v5: add default with DEFINE_LOGLEVE_SETUP_DEF
> >     KERN_APIC
> > v6: set the default only one time
> > 
> > usage:
> > 	in .h to have
> > 		#define KERN_PCI "<pci>"
> > 	in .c to have
> > 		DEFINE_LOGLEVEL_SETUP(pci, KERN_PCI, "pci:");
> > 	then could use
> > 		printk(KERN_DEBUG KERN_PCI fmt, ...);
> > 	and command line
> > 		loglevel=3,pci:8
> > 
> > you can add different printk to different files of one subsys if you like
> > not just one susbsys one tag, and don't need to update kernel.h to add more tags
> 
> This all looks dreadfully similar to Jason Baron's "dynamic debug v2".

yeah, but s/dreadfully/luckily

> Similar enough that we couldn't justify merging both.

agreed.

Here's the summary as i see it: Jason's "dynamic debug" mainly relies on 
automatically creating a section of tags associated with each pr_debug() 
callsite. The unit of filtering is the .c file - which lends itself well 
to things like individual drivers but is not quite good for more generic 
entities like full subsystems.

I think a better model is what hpa suggested: add string tags at the 
call site and make it all a sub-case of printk, via ASCII space tags. 
OTOH, a pr_debug() variant could be offered that just inserts a __FILE__ 
tag into the output - this would enable most of the "dynamic debug" 
functionality that Jason's patch series implements IMO.

There's also a wider robustness argument why this is better: we want to 
keep printk simple by default, hence doing these things via the ASCII 
space is good design. "dynamic debug" does it all programmatically via 
extra sections, etc., which is eventually a source of bugs and 
unrobustness.

	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