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, 13 Jan 2010 18:12:36 +0100
From:	René Bolldorf <xsecute@...glemail.com>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
CC:	Tilman Schmidt <tilman@...p.cc>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	linux-kernel@...r.kernel.org
Subject: Re: [Question]  For what stand's __initdata, __devinit etc. ?

On 01/13/10 17:37, Stefan Richter wrote:
> Tilman Schmidt wrote:
>> Am 2010-01-13 00:42 schrieb Henrique de Moraes Holschuh:
>>> On Tue, 12 Jan 2010, René Bolldorf wrote:
>>>> Hi,
>>>> Do we really need this?
>>>> It will be nice if someone can me explain this.
>>>
>>> http://kernelnewbies.org/FAQ/InitExitMacros
>>
>> That's far from complete. It does not, for example, mention __devinit.
>
> This wiki contains also somewhat misleadingly worded text:  "But why
> must you use these macros ?"  This should read:  "But why would you want
> to use these macros?"
>
> Answer:  They are a micro-optimization which allows the kernel to free
> memory that was occupied by this code at some point, because that code
> won't be used after that point anymore.  (In case of exit macros:  These
> are hints to discard some code from a build in case of certain kernel
> configurations.)  These macros only affect code which is statically
> linked into the kernel.
>
> Some macros, like for example __devinit, have so obscure uses and
> marginal benefits that a normal developer should not bother about them.
> __devinit in particular does not have any effect at all --- except if
> CONFIG_HOTPLUG is not defined.  This may happen in configurations for
> embedded systems.  But the majority of device drivers that you can find
> in the kernel tree are irrelevant (i.e. configured off) on such systems
> anyway.
>
> Some more information on these macros can be found in Corbet, Rubini,
> Kroah-Hartman: Linux Device Drivers, 3rd edition a.k.a. LDD3, which is
> also gratis available on the Web.

Thanks @all :-)
--
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