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.1205191026400.1348-100000@netrider.rowland.org>
Date:	Sat, 19 May 2012 10:30:00 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Randy Dunlap <rdunlap@...otime.net>
cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	<linux-next@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
	Ian Abbott <abbotti@....co.uk>,
	Frank Mori Hess <fmhess@...rs.sourceforge.net>,
	<devel@...verdev.osuosl.org>, USB list <linux-usb@...r.kernel.org>
Subject: Re: [PATCH -next] usb: add usb.h stubs for CONFIG_USB not enabled

On Fri, 18 May 2012, Randy Dunlap wrote:

> From: Randy Dunlap <rdunlap@...otime.net>
> 
> Add stubs for some usb core functions when CONFIG_USB
> is not enabled.  This fixes these comedi build errors:
> 
> ERROR: "usb_deregister" [drivers/staging/comedi/comedi.ko] undefined!
> ERROR: "usb_register_driver" [drivers/staging/comedi/comedi.ko] undefined!
> 
> Signed-off-by: Randy Dunlap <rdunlap@...otime.net>
> ---
> I am only adding the stubs that are needed for comedi to build.
> I expect that more stubs will be needed as more build errors are
> found.  It seems to me that linux/usb.h might need more (major)
> moving of lines to support more stubs in the future.

This doesn't seem like the right thing to do.  If a driver needs to 
register with the USB core then that driver should depend on 
CONFIG_USB.

On the other hand, if the driver is capable of being built without USB 
support then it should use the necessary preprocessor tests to protect 
calls to any USB routines.

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