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: <616734389.10923.1413561134767.JavaMail.zimbra@efficios.com>
Date:	Fri, 17 Oct 2014 15:52:14 +0000 (UTC)
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	Matthew Wilcox <willy@...ux.intel.com>
Cc:	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 07/21] dax,ext2: Replace XIP read and write with DAX
 I/O

----- Original Message -----
> From: "Matthew Wilcox" <willy@...ux.intel.com>
> To: "Mathieu Desnoyers" <mathieu.desnoyers@...icios.com>
> Cc: "Matthew Wilcox" <matthew.r.wilcox@...el.com>, linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
> linux-kernel@...r.kernel.org
> Sent: Friday, October 17, 2014 12:33:31 AM
> Subject: Re: [PATCH v11 07/21] dax,ext2: Replace XIP read and write with DAX I/O
> 
> On Thu, Oct 16, 2014 at 03:51:12PM -0400, Matthew Wilcox wrote:
> > On Thu, Oct 16, 2014 at 11:50:27AM +0200, Mathieu Desnoyers wrote:
> > > > +			if (rw == WRITE) {
> > > > +				if (!buffer_mapped(bh)) {
> > > > +					retval = -EIO;
> > > > +					/* FIXME: fall back to buffered I/O */
> > > 
> > > Fallback on buffered I/O would void guarantee about having data stored
> > > into persistent memory after write returns. Not sure we actually want
> > > that.
> > 
> > Yeah, I think that comment is just stale.  I can't see a way in which
> > buffered I/O would succeed after DAX I/O falis.
> 
> On further consideration, I think the whole thing is just foolish.
> I don't see how get_block(create == 1) can return success *and* a buffer
> that is !mapped.

Perhaps a safe approach could be to put a BUG_ON() to check this assumption ?

Thanks,

Mathieu

> 
> So I did this nice simplification:
> 
> -                       if (rw == WRITE) {
> -                               if (!buffer_mapped(bh)) {
> -                                       retval = -EIO;
> -                                       /* FIXME: fall back to buffered I/O
> */
> -                                       break;
> -                               }
> -                               hole = false;
> -                       } else {
> -                               hole = !buffer_written(bh);
> -                       }
> +                       hole = (rw != WRITE) && !buffer_written(bh);
> 
> (compile-tested only; I'm going to run all the changes through xfstests
> next week when I'm back home before sending out a v12).
> 



-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ