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]
Message-ID: <20120422190136.GA31242@linutronix.de>
Date:	Sun, 22 Apr 2012 21:01:36 +0200
From:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	linux-usb@...r.kernel.org, target-devel@...r.kernel.org,
	Felipe Balbi <balbi@...com>
Subject: Re: linux-next: Tree for Apr 20 (usb & target)

* Greg KH | 2012-04-21 08:34:02 [-0700]:

>> > CONFIG_MODULES is not enabled.
>> > CONFIG_TCM_USB_GADGET=y
>> > CONFIG_USB_GADGET=y
>> 
>> Sebastian + Greg-KH (Cc'ed), any ideas why this is the case here..?
>
>I have no idea, sorry.

The short version:
in order to fix this either move the usb-target-gadget to
drivers/usb/gadget/Kconfig and make sure only one gadget can be compiled
at a time or add some kind of depends.

The longer version:
This is a short comming of the gadget framework. We are able to build
multiple UDCs at a time and we can build multiple gadgets _as_ modules.
Since we can not bind & configure via an interface the whole thing works
right now via "modprobe $gadget. There is some infrastructure to accept
multiple UDCs/gadget but the *whole* thing is not complete.
In non-modules mode you can only select one gadget at a time. With the
target gadget living outside of usb/gadget selection it is possible to
select both at the same time which causes the duplicate symbols here.
A "quick" fix is not to define all the functions static and put
maybe_unsued on each function to avoid warnings. This is only duct tape
on top and I would prefer that nobody is sending such a patch. The
result is hardly usefull by a user.
A real fix would to get rid of the "#includes foo.c" and use a helper
module/library instead.
I tried this once and notice that the whole thing relies on
static/global variables which are initialized once on modprobe. So
with the second module loaded (read as rmmod $mod1 && modprobe $mod2)
the gadget framework explodes. Once I noticed that, the patches got out
of Felipe's tree before anyone noticed something. That means we should
first get rid of the global variables and then maybe try again :)

Sebastian
--
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