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:	Tue, 19 Dec 2006 19:17:43 -0500
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Andrew Morton <akpm@...l.org>
Cc:	Michal Sabala <lkml@...hbs.net>, linux-kernel@...r.kernel.org
Subject: Re: 2.6.18 mmap hangs unrelated apps

On Tue, 2006-12-19 at 16:03 -0800, Andrew Morton wrote:
> On Tue, 19 Dec 2006 18:19:38 -0500
> Trond Myklebust <trond.myklebust@....uio.no> wrote:
> 
> >     NFS: Fix race in nfs_release_page()
> >     
> >     invalidate_inode_pages2() may set the dirty bit on a page owing to the call
> >     to unmap_mapping_range() after the page was locked. In order to fix this,
> >     NFS has hooked the releasepage() method. This, however leads to deadlocks
> >     in other parts of the VM.
> 
> hmm, subtle.
> 
> >     Fix is to add a new callback: flushpage(), which will write out a dirty
> >     page that is under the page lock.
> >     
> 
> I guess this might permit us to clean up some of the nasties in
> invalidate_inode_pages2() - if the page comes dirty again, write it again. 
> But the requirement that the page remain locked makes it hard.  Need to
> think about it some more.

This was one of the reasons why I had to introduce
nfs_writepage_locked() for 2.6.20 (the other reason being readpage()).

The problem is that you can only protect against redirtying of the page
by holding the page lock across the call to unmap_mapping_range(), the
page writeout and the page removal.

> Are you sure this is the cause of the NFS problem?
> 
> >  	.prepare_write = nfs_prepare_write,
> >  	.commit_write = nfs_commit_write,
> >  	.invalidatepage = nfs_invalidate_page,
> > -	.releasepage = nfs_release_page,
> 
> A NULL ->releasepage means that try_to_release_page() will call
> try_to_free_buffers() if PagePrivate().  I suspect you'll need a stub to
> prevent this.

Ack, I'll add one in. If PagePrivate() is set during the call to
try_to_release_page(), then the page should never be freeable.

> (We were supposed to stop doing that about four years ago - change it so
> that all a_ops must implement ->releasepage, but nobody got around to it).

Would you still be interested in seeing this done?


-
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