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:   Mon, 21 Sep 2020 11:23:07 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     Dan Williams <dan.j.williams@...el.com>, Jan Kara <jack@...e.cz>
Cc:     linux-nvdimm@...ts.01.org, linux- stable <stable@...r.kernel.org>,
        Adrian Huang <ahuang12@...ovo.com>,
        Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
        open list <linux-kernel@...r.kernel.org>,
        Ira Weiny <ira.weiny@...el.com>, mpatocka@...hat.com,
        lkft-triage@...ts.linaro.org
Subject: Re: [PATCH v2] dm: Call proper helper to determine dax support

On Fri, 18 Sep 2020 at 11:18, Dan Williams <dan.j.williams@...el.com> wrote:
>
> From: Jan Kara <jack@...e.cz>
>
> DM was calling generic_fsdax_supported() to determine whether a device
> referenced in the DM table supports DAX. However this is a helper for "leaf" device drivers so that
> they don't have to duplicate common generic checks. High level code
> should call dax_supported() helper which that calls into appropriate
> helper for the particular device. This problem manifested itself as
> kernel messages:
>
> dm-3: error: dax access failed (-95)
>
> when lvm2-testsuite run in cases where a DM device was stacked on top of
> another DM device.
>
> Fixes: 7bf7eac8d648 ("dax: Arrange for dax_supported check to span multiple devices")
> Cc: <stable@...r.kernel.org>
> Tested-by: Adrian Huang <ahuang12@...ovo.com>
> Signed-off-by: Jan Kara <jack@...e.cz>
> Acked-by: Mike Snitzer <snitzer@...hat.com>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
> Changes since v1 [1]:
> - Add missing dax_read_lock() around dax_supported()
>
> [1]: http://lore.kernel.org/r/20200916151445.450-1-jack@suse.cz
>
>  drivers/dax/super.c   |    4 ++++
>  drivers/md/dm-table.c |   10 +++++++---
>  include/linux/dax.h   |   11 +++++++++--
>  3 files changed, 20 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dax/super.c b/drivers/dax/super.c
> index e5767c83ea23..b6284c5cae0a 100644
> --- a/drivers/dax/super.c
> +++ b/drivers/dax/super.c
> @@ -325,11 +325,15 @@ EXPORT_SYMBOL_GPL(dax_direct_access);
>  bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
>                 int blocksize, sector_t start, sector_t len)
>  {
> +       if (!dax_dev)
> +               return false;
> +
>         if (!dax_alive(dax_dev))
>                 return false;
>
>         return dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, start, len);
>  }
> +EXPORT_SYMBOL_GPL(dax_supported);

arm build error while building with allmodconfig.

../drivers/dax/super.c:325:6: error: redefinition of ‘dax_supported’
  325 | bool dax_supported(struct dax_device *dax_dev, struct
block_device *bdev,
      |      ^~~~~~~~~~~~~
In file included from ../drivers/dax/super.c:16:
../include/linux/dax.h:162:20: note: previous definition of
‘dax_supported’ was here
  162 | static inline bool dax_supported(struct dax_device *dax_dev,
      |                    ^~~~~~~~~~~~~
make[3]: *** [../scripts/Makefile.build:283: drivers/dax/super.o] Error 1

Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>

Ref:
https://builds.tuxbuild.com/IO690jFQDp0qP9zFuWBqpA/build.log

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ