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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 26 Mar 2008 13:19:50 -0400
From:	"Mike Frysinger" <vapier.adi@...il.com>
To:	"Paul Mundt" <lethal@...ux-sh.org>,
	"Bryan Wu" <cooloney@...nel.org>, wim@...ana.be,
	linux-kernel@...r.kernel.org,
	"Mike Frysinger" <vapier.adi@...il.com>
Subject: Re: [PATCH 1/1] Blackfin Watchdog Driver: split platform device/driver registering from actual watchdog device/driver registering so we can cleanly load/unload

On Wed, Mar 26, 2008 at 12:37 PM, Paul Mundt <lethal@...ux-sh.org> wrote:
> On Wed, Mar 26, 2008 at 06:30:01PM -0700, Bryan Wu wrote:
>  > +#define pr_devinit(fmt, args...) ({ static const __devinitdata char __fmt[] = fmt; printk(__fmt, ## args); })
>  >  #define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })
>
>  WTF? You are trying to micro-optimize the string? And you have a printk
>  that changes behaviour if you have hotplug enabled or not. That's so
>  utterly bizarre that the rationale must be fascinating.

the rationale behind it seems fairly obvious to me.  the strings are
placed into the respective init sections so they get released as
needed.  it isnt a matter of tying it to hotplug as tying it to the
function: __init or __devinit.

>  pr_xxx() also is a protected namespace that belongs in
>  include/linux/kernel.h, though I can see why you opted to hide these in
>  your driver rather than post them for general inclusion.

actually, it was already posted to lkml some time ago as an idea.  the
idea stalled so i just use it in my drivers in the meantime.  it's
certainly much cleaner than what was proposed by someone else
originally:
char __init foo[] = "moo";
...
    printk(foo, ...)
...

>  If you are hurting that badly for space, just turn off CONFIG_PRINTK and
>  move on with life. This is just insane.

doing it this way seems pretty clean to me using existing section markings.
-mike
--
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