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:	Tue, 07 Apr 2009 12:08:47 +1000
From:	Michael Ellerman <michael@...erman.id.au>
To:	Jason Baron <jbaron@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] Resurrect old pr_debug() semantics as pr_devel()

On Mon, 2009-04-06 at 17:24 -0400, Jason Baron wrote:
> On Mon, Apr 06, 2009 at 02:30:03PM +1000, Michael Ellerman wrote:
> > pr_debug() used to produce zero code unless DEBUG was #defined. This is
> > now no longer the case in practice[1].
> > 
> > There are places where it's useful to have debugging printks, but we
> > don't want them to generate any code in production kernels.
> > 
> > So add a new macro, pr_devel(), for _devel_opment, to provide the old
> > semantics, ie. if the programmer doesn't explicitly enable debugging,
> > no code is produced.
> > 
> > [1]: You can turn CONFIG_DYNAMIC_DEBUG off, but it's enabled in at least
> >      one distro kernel, so it's not really a solution.
> > 
> 
> hmm...its designed to have low overhead when CONFIG_DYNAMIC_DEBUG
> is on, but none of the debugging printks are enabled. 

Sure, it does that fairly well, and there are places where it's a good
trade off to have the debug available at the cost of a bit more code.

> Is there a specific benchmark or test case that is unaccpetable?

Yes. Compiling with DYNAMIC_DEBUG=y generates a non-zero amount of code
for each pr_debug(), and in some places that is unacceptable.  :)

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ