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: <2927969.oKuMf0pyRb@pc-42>
Date:   Mon, 14 Oct 2019 09:53:20 +0000
From:   Jerome Pouiller <Jerome.Pouiller@...abs.com>
To:     zhong jiang <zhongjiang@...wei.com>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND v2] staging: wfx: fix an undefined reference error
 when CONFIG_MMC=m

On Saturday 12 October 2019 04:48:55 CEST zhong jiang wrote:
> On 2019/10/12 0:57, Jerome Pouiller wrote:
> > On Friday 11 October 2019 18:38:17 CEST zhong jiang wrote:
> >> I hit the following error when compile the kernel.
> >>
> >> drivers/staging/wfx/main.o: In function `wfx_core_init':
> >> /home/z00352263/linux-next/linux-next/drivers/staging/wfx/main.c:488: undefined reference to `sdio_register_driver'
> >> drivers/staging/wfx/main.o: In function `wfx_core_exit':
> >> /home/z00352263/linux-next/linux-next/drivers/staging/wfx/main.c:496: undefined reference to `sdio_unregister_driver'
> >> drivers/staging/wfx/main.o:(.debug_addr+0x1a8): undefined reference to `sdio_register_driver'
> >> drivers/staging/wfx/main.o:(.debug_addr+0x6f0): undefined reference to `sdio_unregister_driver'
> > For information, I cannot reproduce your issue (it does not mean that
> > the issue does not exist). In add, if you obtain undefined references,
> > it should only happen when CONFIG_MMC is not defined.
> I attach the config,  you can test it and reproduce the issue.
> 
> Thanks,
> zhogn jiang
> > Can you check that your Modules.symvers is up-to-date (by running a
> > 'make modules') ?
Hello Zhong,

Now, I see the problem. It happens when CONFIG_MMC=m and CONFIG_WFX=y
(if CONFIG_WFX=m, it works).

I think the easiest way to solve problem is to disallow CONFIG_WFX=y if 
CONFIG_MMC=m.

This solution impacts users who want to use SPI bus with configuration:
CONFIG_WFX=y + CONFIG_SPI=y + CONFIG_MMC=m. However, I think this is a
twisted case. So, I think it won't be missed.

I think that patch below do the right thing:

-----8<----------8<----------------------8<-----------------

diff --git i/drivers/staging/wfx/Kconfig w/drivers/staging/wfx/Kconfig
index 9b8a1c7a9e90..833f3b05b6b4 100644
--- i/drivers/staging/wfx/Kconfig
+++ w/drivers/staging/wfx/Kconfig
@@ -1,7 +1,7 @@
 config WFX
        tristate "Silicon Labs wireless chips WF200 and further"
        depends on MAC80211
-       depends on (SPI || MMC)
+       depends on (MMC=m && m) || MMC=y || (SPI && MMC!=m)
        help
          This is a driver for Silicons Labs WFxxx series (WF200 and further)
          chipsets. This chip can be found on SPI or SDIO buses.


-- 
Jérôme Pouiller

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ