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]
Message-ID: <20180714014105.GY2234@dastard>
Date:   Sat, 14 Jul 2018 11:41:05 +1000
From:   Dave Chinner <david@...morbit.com>
To:     Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc:     Eryu Guan <eguan@...hat.com>, fstests@...r.kernel.org,
        Jan Kara <jack@...e.cz>,
        Dan Williams <dan.j.williams@...el.com>,
        Christoph Hellwig <hch@....de>, linux-nvdimm@...ts.01.org,
        linux-ext4@...r.kernel.org
Subject: Re: [fstests PATCH v2 2/2] generic/999: test DAX DMA vs
 truncate/hole-punch

On Tue, Jul 10, 2018 at 04:09:42PM -0600, Ross Zwisler wrote:
> This adds a regression test for the following series:
> 
> https://lists.01.org/pipermail/linux-nvdimm/2018-July/016842.html
> 
> which adds synchronization between DAX DMA in ext4 and truncate/hole-punch.
> The intention of the test is to test those specific changes, but it runs
> fine both with XFS and without DAX so I've put it in the generic tests
> instead of ext4 and not restricted it to only DAX configurations.
> 
> When run with v4.18-rc4 + DAX + ext4, this test will hit the following
> WARN_ON_ONCE() in dax_disassociate_entry():
> 
> 	WARN_ON_ONCE(trunc && page_ref_count(page) > 1);
> 
> If you change this to a WARN_ON() instead, you can see that each of the
> four paths being exercised in this test hits that condition many times in
> the one second that the subtest is being run.
> 
> Signed-off-by: Ross Zwisler <ross.zwisler@...ux.intel.com>

just a FWIW:

> +int main(int argc, char *argv[])
> +{
> +	int err;
> +
> +	if (argc != 3) {
> +		printf("Usage: %s <dax file> <non-dax file>\n",
> +				basename(argv[0]));
> +		exit(0);
> +	}

This is an example of why we should be supporting per-inode DAX
enablement in all filesystems, not a global mount option....

> +_supported_fs generic
> +_supported_os Linux
> +_require_test
> +_require_test_program "t_mmap_collision"
> +
> +# To get the failure we turn off DAX on our SCRATCH_MNT so we can get O_DIRECT
> +# behavior.  We will continue to use unmodified mount options for the test
> +# TEST_DIR.  The failures fixed by the above mentioned kernel patch trigger
> +# when those mount options include "-o dax", but the test runs fine without
> +# that option so we don't require it.
> +export MOUNT_OPTIONS=""
> +_scratch_unmount >> $seqres.full 2>&1
> +_scratch_mount >> $seqres.full 2>&1

And then all this crap would go away....

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ