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:   Fri, 9 Sep 2016 11:14:31 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>
Subject: Re: [PATCH] /dev/dax: fix Kconfig dependency build breakage

On Fri, Sep 9, 2016 at 10:56 AM, Ross Zwisler
<ross.zwisler@...ux.intel.com> wrote:
> The function dax_pmem_probe() in drivers/dax/pmem.c is compiled under the
> CONFIG_DEV_DAX_PMEM tri-state config option.  This config option currently
> only depends on CONFIG_NVDIMM_DAX, which means that the following
> configuration is possible:
>
> CONFIG_LIBNVDIMM=m
> ...
> CONFIG_NVDIMM_DAX=y
> CONFIG_DEV_DAX=y
> CONFIG_DEV_DAX_PMEM=y
>
> With this config LIBNVDIMM is compiled as a module with NVDIMM_DAX=y just
> meaning that we will compile drivers/nvdimm/dax_devs.c into that module.
> However, dax_pmem_probe() depends on several symbols defined in
> drivers/nvdimm/dax_devs.c, which results in the following build errors:
>
> drivers/built-in.o: In function `dax_pmem_probe':
> linux/drivers/dax/pmem.c:70: undefined reference to `to_nd_dax'
> linux/drivers/dax/pmem.c:74: undefined reference to `nvdimm_namespace_common_probe'
> linux/drivers/dax/pmem.c:80: undefined reference to `devm_nsio_enable'
> linux/drivers/dax/pmem.c:81: undefined reference to `nvdimm_setup_pfn'
> linux/drivers/dax/pmem.c:84: undefined reference to `devm_nsio_disable'
> linux/drivers/dax/pmem.c:122: undefined reference to `to_nd_region'
> drivers/built-in.o: In function `dax_pmem_init':
> linux/drivers/dax/pmem.c:147: undefined reference to `__nd_driver_register'
>
> Fix this by making CONFIG_DEV_DAX_PMEM explicitly depend on
> CONFIG_LIBNVDIMM.  This prevents dax_devs.c from being built as a built-in
> while its dependencies are in the libnvdimm.ko module.
>
> Signed-off-by: Ross Zwisler <ross.zwisler@...ux.intel.com>
> ---
>  drivers/dax/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
> index cedab75..5cd9436 100644
> --- a/drivers/dax/Kconfig
> +++ b/drivers/dax/Kconfig
> @@ -15,6 +15,7 @@ if DEV_DAX
>  config DEV_DAX_PMEM
>         tristate "PMEM DAX: direct access to persistent memory"
>         depends on NVDIMM_DAX
> +       depends on LIBNVDIMM

Hmm, NVDIMM_DAX already depends on LIBNVDIMM.  I think NVDIMM_DAX just
needs to be a tristate rather than a bool.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ