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, 23 May 2012 12:00:29 -0600
From:	Jim Cromie <jim.cromie@...il.com>
To:	Joe Perches <joe@...ches.com>, Jason Baron <jbaron@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [RFC PATCH] dynamic_debug: Remove __used attribute from metadata

On Thu, May 17, 2012 at 2:02 PM, Joe Perches <joe@...ches.com> wrote:
> The __used attribute in the declaration of the
> dynamic_debug metadata stops the compiler from
> optimizing and eliminating constant tests and
> the metadata declaration used in things like:
>
>   #define DEBUG_LEVEL 0
>   if (DEBUG_LEVEL > 1)
>        pr_debug("foo...");
>
> This is a common construct for debugging macros
> with a constant "level" test.
>
> When dynamic_debug is not configured, this is
> pr_debug and format string is eliminated unless
> DEBUG_LEVEL is greater than 1.
>
> Remove the unnecessary __used attribute so the
> even the dynamic_debug use of pr_debug can be
> appropriately optimized away completely.
>


Im a bit puzzled - the __used attr is in the
#if defined(CONFIG_DYNAMIC_DEBUG) branch.

If its not config'd, the METADATA is not compiled,
and this should have no effect.
Did you mean enabled instead of configured ?

FWIW, removing __used causes no harm here,
ie it doesnt break dynamic-debug facility.

Still, Id like to hear from Jason, he wrote it.
--
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