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] [day] [month] [year] [list]
Message-ID: <20170511153652.GB22811@linux.intel.com>
Date:   Thu, 11 May 2017 09:36:52 -0600
From:   Ross Zwisler <ross.zwisler@...ux.intel.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     linux-nvdimm@...ts.01.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        Christoph Hellwig <hch@....de>, Jan Kara <jack@...e.com>
Subject: Re: [PATCH] filesystem-dax: fix broken __dax_zero_page_range()
 conversion

On Wed, May 10, 2017 at 07:49:47PM -0700, Dan Williams wrote:
> The conversion of __dax_zero_page_range() to 'struct dax_operations'
> caused it to frequently fail. The mistake was treating the @size
> parameter as a dax mapping length rather than just a length of the
> clear_pmem() operation. The dax mapping length is assumed to be hard
> coded as PAGE_SIZE.
> 
> Without this fix any page unaligned zeroing request will trigger a
> -EINVAL return from bdev_dax_pgoff().
> 
> Cc: Jan Kara <jack@...e.com>
> Cc: Christoph Hellwig <hch@....de>
> Reported-by: Ross Zwisler <ross.zwisler@...ux.intel.com>

Yep, this solves the issue for me.  Thanks!

Tested-by: Ross Zwisler <ross.zwisler@...ux.intel.com>

> Fixes: cccbce671582 ("filesystem-dax: convert to dax_direct_access()")
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
>  fs/dax.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/dax.c b/fs/dax.c
> index ce9dc9c3e829..5ee1d212d81f 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -971,12 +971,12 @@ int __dax_zero_page_range(struct block_device *bdev,
>  		void *kaddr;
>  		pfn_t pfn;
>  
> -		rc = bdev_dax_pgoff(bdev, sector, size, &pgoff);
> +		rc = bdev_dax_pgoff(bdev, sector, PAGE_SIZE, &pgoff);
>  		if (rc)
>  			return rc;
>  
>  		id = dax_read_lock();
> -		rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr,
> +		rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr,
>  				&pfn);
>  		if (rc < 0) {
>  			dax_read_unlock(id);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ