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:	Wed, 07 May 2014 11:37:04 -0700
From:	Joe Perches <joe@...ches.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Dan Streetman <ddstreet@...e.org>,
	Fabian Frederick <fabf@...net.be>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Borislav Petkov <borislav.petkov@....com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] plist: replace pr_debug with printk in plist_test()

On Wed, 2014-05-07 at 14:19 -0400, Steven Rostedt wrote:
> On Wed, 07 May 2014 11:10:38 -0700
> Joe Perches <joe@...ches.com> wrote:
> 
> > On Wed, 2014-05-07 at 10:35 -0400, Steven Rostedt wrote:
> > > On Wed, 7 May 2014 10:21:28 -0400 Dan Streetman <ddstreet@...e.org> wrote:
> > 
> > > > It would be even better if the note could clarify that sometimes it is
> > > > ok to use printk(KERN_DEBUG
> > > 
> > > Exactly. I think it's rather stupid to have to do a #define DEBUG to
> > > have pr_debug() print in general.
> > > 
> > > I see no reason to have pr_debug() be anything different than the other
> > > pr_*() functions.
> > 
> > pr_debug is meant to be disabled and have _no_ runtime
> > effect unless DEBUG is #defined.
> 
> I understand why it does it, but having pr_debug() named just like
> pr_info(), pr_notice(), pr_warning(), pr_err(), pr_crit(), pr_alert(),
> pr_emerg(), where all those are just printk(<LOGLEVEL>...) *except* for
> pr_debug(). That's inconsistent and wrong.
> 
> pr_debug() should have been just printk(KERN_DEBUG ...) as that follows
> convention.

The convention history is kind of inverted.

As you probably know, all the other pr_<level>
macros other than pr_info were added some years
after pr_debug.

> Yes, it's somewhat too late as pr_debug() is all over the place, but
> maybe when things slow down (Ha! like that will ever happen ... "are we
> done yet?"), then we could do a massive clean up and rename pr_debug()
> to something not so confusing in its usage compared to the other pr_*()
> prints.

g'luck with that.

Renaming pr_warning to pr_warn has taken 4 years
and it's only a 2:1 ratio in favor of pr_warn and
there are _more_ uses of pr_warning today than when
pr_warn was introduced. (1006 to 773)

cheers, Joe

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