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:   Tue, 14 Aug 2018 09:58:25 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Arnd Bergmann <arnd@...db.de>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Johan Hovold <johan@...nel.org>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: hide usb_of_get_companion_dev for CONFIG_USB=n

On Mon, 13 Aug 2018, Arnd Bergmann wrote:

> The renesas UDC implementation now calls usb_of_get_companion_dev(),
> which is only defined when CONFIG_USB is enabled:
> 
> drivers/usb/gadget/udc/renesas_usb3.o: In function `renesas_usb3_probe':
> renesas_usb3.c:(.text+0xa34): undefined reference to `usb_of_get_companion_dev'
> 
> To avoid the build error, we need two changes:
> 
> - usb_of_get_companion_dev must be stubbed out when CONFIG_USB is
>   disabled, so it the udc driver can be built for a gadget-only
>   mode kernel
> - With CONFIG_USB=m, we must not attempt to have USB_RENESAS_USB3
>   built-in, so we need a soft dependency on USB.
> 
> Fixes: 39facfa01c9f ("usb: gadget: udc: renesas_usb3: Add register of usb role switch")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/usb/gadget/udc/Kconfig | 1 +
>  include/linux/usb/of.h         | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
> index 0a16cbd4e528..663a8bd67a7b 100644
> --- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -193,6 +193,7 @@ config USB_RENESAS_USB3
>  	tristate 'Renesas USB3.0 Peripheral controller'
>  	depends on ARCH_RENESAS || COMPILE_TEST
>  	depends on EXTCON
> +	depends on USB || !USB

Is this some weird standard idiom?  It looks really strange.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ