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-next>] [day] [month] [year] [list]
Date:   Fri, 6 Jan 2017 18:32:39 +0800
From:   Eryu Guan <eguan@...hat.com>
To:     linux-block@...r.kernel.org
Cc:     chaitanya.kulkarni@...t.com, linux-xfs@...r.kernel.org,
        linux-ext4@...r.kernel.org
Subject: [BUG v4.10-rc1] fzero returns EIO on DAX mount

Hi all,

I hit a regression in my xfstests run on DAX mount with 4.10-rc1 and rc2
kernel, some fzero/fpunch/ftruncate operations start returning EIO, extN
and xfs are all affected. 4.9 kernel is doing well.

This is a simple reproducer:

	modprobe brd rd_size=$((1024*1024))
	mkfs -t ext4 -F /dev/ram0
	mount -o dax /dev/ram0 /mnt/ext4
	xfs_io -fc "pwrite 0 1024" -c "fzero 0 1024" /mnt/ext4/testfile

The last xfs_io returns:
	wrote 1024/1024 bytes at offset 0
	1 KiB, 1 ops; 0.0000 sec (17.013 KiB/sec and 17.0132 ops/sec)
	fallocate: Input/output error

And git bisect pointed the first bad commit to

e73c23ff736e1ea371dfa419d7bf8e77ee53044a
Author: Chaitanya Kulkarni <chaitanya.kulkarni@...t.com>
Date:   Wed Nov 30 12:28:58 2016 -0800

    block: add async variant of blkdev_issue_zeroout

    Similar to __blkdev_issue_discard this variant allows submitting
    the final bio asynchronously and chaining multiple ranges
    into a single completion.

    Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@...t.com>
    Reviewed-by: Christoph Hellwig <hch@....de>
    Signed-off-by: Jens Axboe <axboe@...com>

I've confirmed that "reverting" it fixed all the new test failures, by
"reverting" I mean revert it when it's the top.

A preliminary investigation shows that it's submit_bio_wait() in
blkdev_issue_zeroout() where EIO is returned.

block/blk-lib.c:blkdev_issue_zeroout
        ret = __blkdev_issue_zeroout(bdev, sector, nr_sects, gfp_mask,                                                                                                                         
                        &bio, discard);                                                                                                                                                        
        if (ret == 0 && bio) {                                                                                                                                                                 
                ret = submit_bio_wait(bio);                                                                                                                                                    
                bio_put(bio);                                                                                                                                                                  
        }

Thanks,
Eryu

P.S. failed xfstests cases

xfs:
generic/008 generic/029 generic/030 generic/074 generic/075 generic/086
generic/091 generic/112 generic/127 generic/135 generic/231 generic/263
generic/392 xfs/071 xfs/190 xfs/229 xfs/290

ext4:
generic/008 generic/075 generic/091 generic/112 generic/127 generic/263

ext2,ext3:
generic/091 generic/127 generic/263
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ