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  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:   Sun, 15 Oct 2017 21:38:57 +0800
From:   Bin Meng <bmeng.cn@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Brian Norris <computersforpeace@...il.com>,
        Richard Weinberger <richard@....at>,
        David Woodhouse <dwmw2@...radead.org>,
        linux-mtd <linux-mtd@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Stefan Roese <sr@...x.de>
Subject: Re: [PATCH] spi-nor: intel-spi: Fix Kconfig dependency to LPC_ICH

Hi Arnd,

On Fri, Oct 13, 2017 at 7:15 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Wed, Oct 11, 2017 at 10:03 AM, Cyrille Pitchen
> <cyrille.pitchen@...ev4u.fr> wrote:
>> Le 25/08/2017 à 10:12, Bin Meng a écrit :
>>> The Intel SPI-NOR driver is dependent on LPC_ICH to get the platform
>>> data. Select it in the Kconfig.
>>>
>>> Signed-off-by: Bin Meng <bmeng.cn@...il.com>
>>
>> Applied to the spi-nor/next branch of l2-mtd
>
> This causes a build error now:
>
> warning: (SPI_INTEL_SPI_PLATFORM && ITCO_WDT) selects LPC_ICH which
> has unmet direct dependencies (HAS_IOMEM && PCI)
> drivers/mfd/lpc_ich.c: In function 'lpc_ich_init_spi':
> drivers/mfd/lpc_ich.c:1137:3: error: implicit declaration of function
> 'pci_bus_write_config_byte'; did you mean 'pci_write_config_byte'?
> [-Werror=implicit-function-declaration]
>

Thanks for your testing. However, I believe this build error cannot be
seen in a real system due to x86 always has PCI on. But I see you were
doing build testing with COMPILE_TEST.

> Generally speaking, using 'select' to force-enable another
> driver is a bad idea and causes endless problems, but if you
> insist on doing that, please make sure you get the right
> dependencies.
>

Sure.

> Also, the 'depends on EXPERT' statement looks misplaced,
> enabling EXPERT should only be there to allow you to turn
> extra things *off*, not to hide device drivers.
>

I will leave this to Mika to comment the "EXPERT" usage. If we remove
this, I think that should be another patch and the documentation of
this driver should be updated too.

> How about this:
>
> diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
> index 19bcb63a1ce7..b81d9b4dae7b 100644
> --- a/drivers/mtd/spi-nor/Kconfig
> +++ b/drivers/mtd/spi-nor/Kconfig
> @@ -90,7 +90,7 @@ config SPI_INTEL_SPI
>         tristate
>
>  config SPI_INTEL_SPI_PCI
> -       tristate "Intel PCH/PCU SPI flash PCI driver" if EXPERT
> +       tristate "Intel PCH/PCU SPI flash PCI driver"
>         depends on X86 && PCI
>         select SPI_INTEL_SPI
>         help
> @@ -106,10 +106,10 @@ config SPI_INTEL_SPI_PCI
>           will be called intel-spi-pci.
>
>  config SPI_INTEL_SPI_PLATFORM
> -       tristate "Intel PCH/PCU SPI flash platform driver" if EXPERT
> -       depends on X86
> +       tristate "Intel PCH/PCU SPI flash platform driver"
> +       depends on X86 && (PCI || COMPILE_TEST)
>         select SPI_INTEL_SPI
> -       select LPC_ICH
> +       select LPC_ICH if PCI

I think we just need do:

depends on X86 && PCI

then

select LPC_ICH

>         help
>           This enables platform support for the Intel PCH/PCU SPI
>           controller in master mode. This controller is present in modern
>

Regards,
Bin

Powered by blists - more mailing lists