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:   Sat, 2 Jun 2018 11:33:12 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        David Chinner <david@...morbit.com>, linux-xfs@...r.kernel.org,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dave Jiang <dave.jiang@...el.com>
Subject: Re: linux-next: manual merge of the nvdimm tree with the xfs tree

Hi Darrick,

On Fri, 1 Jun 2018 17:59:48 -0700 "Darrick J. Wong" <darrick.wong@...cle.com> wrote:
>
> > + 	if (!dax_enabled) {
> >  -		pr_debug("VFS (%s): error: dax support not enabled\n",
> >  -				sb->s_id);
> >  +		pr_debug("%s: error: dax support not enabled\n",
> >  +				bdevname(bdev, buf));
> > - 		return false;
> > + 		return -EOPNOTSUPP;  
> 
> Hang on a sec, the changes in the xfs tree make this function return a
> boolean (true for dax-is-supported, false for dax-not-supported), but
> this change partially reverts the boolean return values.

OK, weird, that is what I though I had done.  Thanks for pointing it
out (I guess it was getting late :-().

> >   	}
> > - 
> > - 	return true;
> > + 	return 0;  
> 
> The merge should retain the 'return false' above and the 'return true'
> here... or possibly just return dax_enabled:
> 
> if (!dax_enabled) {
> 	pr_debug(...);
> 	pr_debug(...);
> }
> 
> return dax_enabled;

OK, I have fixed up my merge resolution.  The end of that function will
now look like this:

	if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) {
		/*
		 * An arch that has enabled the pmem api should also
		 * have its drivers support pfn_t_devmap()
		 *
		 * This is a developer warning and should not trigger in
		 * production. dax_flush() will crash since it depends
		 * on being able to do (page_address(pfn_to_page())).
		 */
		WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API));
		dax_enabled = true;
	} else if (pfn_t_devmap(pfn)) {
		struct dev_pagemap *pgmap;

		pgmap = get_dev_pagemap(pfn_t_to_pfn(pfn), NULL);
		if (pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX)
			dax_enabled = true;
		put_dev_pagemap(pgmap);
	}

	if (!dax_enabled)
		pr_debug("%s: error: dax support not enabled\n",
				bdevname(bdev, buf));

	return dax_enabled;
}
EXPORT_SYMBOL_GPL(__bdev_dax_supported);

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ