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: Wed, 27 Mar 2024 17:46:52 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Trond Myklebust <trondmy@...merspace.com>
Cc: "hch@....de" <hch@....de>, "miklos@...redi.hu" <miklos@...redi.hu>,
	"dhowells@...hat.com" <dhowells@...hat.com>,
	"ceph-devel@...r.kernel.org" <ceph-devel@...r.kernel.org>,
	"linux-cifs@...r.kernel.org" <linux-cifs@...r.kernel.org>,
	"brauner@...nel.org" <brauner@...nel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"v9fs@...ts.linux.dev" <v9fs@...ts.linux.dev>,
	"netfs@...ts.linux.dev" <netfs@...ts.linux.dev>,
	"jlayton@...nel.org" <jlayton@...nel.org>,
	"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...ts.orangefs.org" <devel@...ts.orangefs.org>,
	"linux-afs@...ts.infradead.org" <linux-afs@...ts.infradead.org>
Subject: Re: [RFC PATCH] mm, netfs: Provide a means of invalidation without
 using launder_folio

On Wed, Mar 27, 2024 at 03:56:50PM +0000, Trond Myklebust wrote:
> On Wed, 2024-03-27 at 15:04 +0000, David Howells wrote:
> > Implement a replacement for launder_folio[1].  The key feature of
> > invalidate_inode_pages2() is that it locks each folio individually,
> > unmaps
> > it to prevent mmap'd accesses interfering and calls the -
> > >launder_folio()
> > address_space op to flush it.  This has problems: firstly, each folio
> > is
> > written individually as one or more small writes; secondly, adjacent
> > folios
> > cannot be added so easily into the laundry; thirdly, it's yet another
> > op to
> > implement.
> 
> This is hardly a drop-in replacement for launder_page. The whole point
> of using invalidate_inode_pages2() was that it only requires taking the
> page locks, allowing us to use it in contexts such as
> nfs_release_file().
> 
> The above use of truncate_inode_pages_range() will require any caller
> to grab several locks in order to prevent data loss through races with
> write system calls.

I don't understand why you need launder_folio now
that you have a page_mkwrite implementation (your commit
e3db7691e9f3dff3289f64e3d98583e28afe03db used this as justification).
Other filesystems (except the network filesystems that copied the NFS
implementation) don't implement launder_folio.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ