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: <Pine.LNX.4.44L0.1303261456400.999-100000@iolanthe.rowland.org>
Date:	Tue, 26 Mar 2013 15:04:56 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Florian Fainelli <florian@...nwrt.org>
cc:	linux-kernel@...r.kernel.org, <arnd@...db.de>,
	<gregkh@...uxfoundation.org>, <linux-usb@...r.kernel.org>
Subject: Re: [RFC PATCH 1/5] USB: drop depends on USB and enclose everything
 into an if USB block

On Tue, 26 Mar 2013, Florian Fainelli wrote:

> This patch removes the depends on USB from all config symbols in
> drivers/usb/host/Kconfig and replace that with an if USB / endif block
> as suggested by Alan Stern.

I'm afraid this patch is filled with errors.

For one thing, it doesn't appreciate the difference between host-side
USB and device-side USB.  CONFIG_USB describes support for the
host-side part of the stack, whereas CONFIG_USB_GADGET describes
support for the device-side (or gadget-side) part.  This means you must
not make things like drivers/usb/gadget/Kconfig dependent on 
CONFIG_USB.

For another, the patch doesn't understand the difference between && and 
||.  As an example, putting chipidea/Kconfig inside "if USB" and then 
doing this:

> --- a/drivers/usb/chipidea/Kconfig
> +++ b/drivers/usb/chipidea/Kconfig
> @@ -1,6 +1,6 @@
>  config USB_CHIPIDEA
>  	tristate "ChipIdea Highspeed Dual Role Controller"
> -	depends on USB || USB_GADGET
> +	depends on USB_GADGET
>  	help
>  	  Say Y here if your system has a dual role high speed USB
>  	  controller based on ChipIdea silicon IP. Currently, only the

effectively changes the || to an &&.  This is not what we want.

You need to be a lot more careful about the distinction between hosts
and gadgets.  The situation becomes even more complicated when you
realize that some of the code applies to Dual-Role Devices, which can
be either hosts or gadgets (this includes OTG).  In addition, there are
a few things (such as gadget/dummy_hcd.c) which require _both_
host-side and device-side support.

Alan Stern

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