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, 24 Apr 2013 10:05:46 -0700
From:	Michal Nazarewicz <mina86@...a86.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH] usb: gadget: multi: Mark {cdc,rndis}_config_register() __init

On Wed, Apr 24 2013, Geert Uytterhoeven wrote:
> If gcc (e.g. 4.1.2) decides not to inline cdc_config_register() and
> rndis_config_register(), this will cause section mismatch warnings:
>
> WARNING: drivers/usb/gadget/g_multi.o(.text+0x32f6): Section mismatch in reference from the function cdc_config_register() to the function .init.text:cdc_do_config()
> The function cdc_config_register() references
> the function __init cdc_do_config().
> This is often because cdc_config_register lacks a __init
> annotation or the annotation of cdc_do_config is wrong.
>
> WARNING: drivers/usb/gadget/g_multi.o(.text+0x3326): Section mismatch in reference from the function rndis_config_register() to the function .init.text:rndis_do_config()
> The function rndis_config_register() references
> the function __init rndis_do_config().
> This is often because rndis_config_register lacks a __init
> annotation or the annotation of rndis_do_config is wrong.
>
> Fortunately they're harmless, as {cdc,rndis}_config_register() are only
> called from multi_bind(), which is annotated with __ref.
>
> Mark {cdc,rndis}_config_register() with the __init annotation to kill the
> warning.
>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>

Acked-by: Michal Nazarewicz <mina86@...a86.com>

With transition to configfs all those __inits and __refs will probably
go away in the long term though.

> ---
> Note: I did not verify that multi_bind() is rightfully marked __ref.

It should be.  It's only referenced in multi_driver object as a bind
callback which is called by composite_bind() which is referenced in
composite_driver_template as bind callback which is called by
usb_gadget_probe_driver() which is called by usb_composite_probe() which
is called by multi_init() which is __init and called as module_init.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@...gle.com>--------------ooO--(_)--Ooo--

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ