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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 19 Jun 2021 10:30:22 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Matthias Kaehlcke <mka@...omium.org>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Douglas Anderson <dianders@...omium.org>
Subject: Re: Looking for help with Kconfig dependencies

On Sat, Jun 19, 2021 at 2:05 AM Matthias Kaehlcke <mka@...omium.org> wrote:
>
> Hi,
>
> I'm adding a new driver and have an issue with Kconfig dependencies
> that I coulnd't sort out so far.
>
> Patch https://lore.kernel.org/patchwork/patch/1444212/ adds the new
> onboard_usb_hub driver which exports two functions,
> onboard_hub_create_pdevs() and onboard_hub_destroy_pdevs(). It also
> provides stubs for these functions which are used when the driver
> is not selected (CONFIG_USB_ONBOARD_HUB=n).
>
> The new exported functions are called by the xhci-plat driver
> (https://lore.kernel.org/patchwork/patch/1444215/). Since xhci-plat
> now depends on symbols from the onboard_hub_driver the following
> dependency was added to its Kconfig entry:
>
>   config USB_XHCI_PLATFORM
>     tristate "Generic xHCI driver for a platform device"
>     select USB_XHCI_RCAR if ARCH_RENESAS
>  +  depends on USB_ONBOARD_HUB || !USB_ONBOARD_HUB
>
> This generally seems to work, however when USB_XHCI_PLATFORM is
> forced to be builtin by another driver that depends on it (e.g.
> USB_DWC3) it is still possible to build the onboard_hub driver
> as a module, which results in unresolved symbols:
>
> aarch64-linux-gnu-ld: drivers/usb/host/xhci-plat.o: in function
> `xhci_plat_remove':
> drivers/usb/host/xhci-plat.c:427: undefined reference to
> `onboard_hub_destroy_pdevs'
> drivers/usb/host/xhci-plat.c:427:(.text+0x82c): relocation truncated
> to fit: R_AARCH64_CALL26 against undefined symbol
> `onboard_hub_destroy_pdevs'
> aarch64-linux-gnu-ld: drivers/usb/host/xhci-plat.o: in function
> `xhci_plat_probe':
> drivers/usb/host/xhci-plat.c:379: undefined reference to
> `onboard_hub_create_pdevs'
> drivers/usb/host/xhci-plat.c:379:(.text+0x131c): relocation truncated
> to fit: R_AARCH64_CALL26 against undefined symbol
> `onboard_hub_create_pdevs'
>
> Kconfig generates the following warning with this configuration:
>
> WARNING: unmet direct dependencies detected for USB_XHCI_PLATFORM
>   Depends on [m]: USB_SUPPORT [=y] && USB [=y] && USB_XHCI_HCD [=y] && (USB_ONBOARD_HUB [=m] || !USB_ONBOARD_HUB [=m])
>   Selected by [y]:
>   - USB_DWC3 [=y] && USB_SUPPORT [=y] && (USB [=y] || USB_GADGET [=y]) && HAS_DMA [=y] && USB_XHCI_HCD [=y]
>   Selected by [m]:
>   - USB_CDNS_SUPPORT [=m] && USB_SUPPORT [=y] && (USB [=y] || USB_GADGET [=y]) && HAS_DMA [=y] && USB_XHCI_HCD [=y]
>   - USB_BRCMSTB [=m] && USB_SUPPORT [=y] && USB [=y] && (ARCH_BRCMSTB [=y] && PHY_BRCM_USB [=m] || COMPILE_TEST [=y]) && USB_XHCI_HCD [=y]
>   - USB_XHCI_MVEBU [=m] && USB_SUPPORT [=y] && USB [=y] && USB_XHCI_HCD [=y] && HAS_IOMEM [=y] && (ARCH_MVEBU [=y] || COMPILE_TEST [=y])
>
> I read through kconfig-language.rst and experimented a fair bit,
> but haven't found a working solution. Any advice would be
> appreciated.
>
> Thanks
>
> Matthias



This issue should be discussed in the USB ML,
but probably 'depends on USB_XHCI_PLATFORM'
should be used everywhere instead of
'depends on USB_XHCI_PLATFORM'.







--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ