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: <452DFD5B.8080409@yahoo.com.au>
Date:	Thu, 12 Oct 2006 18:31:23 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Dmitriy Monakhov <dmonakhov@...ru>
CC:	Andrew Morton <akpm@...l.org>,
	Dmitriy Monakhov <dmonakhov@...nvz.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Linux Memory Management <linux-mm@...ck.org>,
	devel@...nvz.org, ext2-devel@...ts.sourceforge.net,
	Andrey Savochkin <saw@...oft.com>
Subject: Re: [RFC][PATCH] EXT3: problem with page fault inside a transaction

Dmitriy Monakhov wrote:
> Andrew Morton <akpm@...l.org> writes:

>>With the stuff Nick and I are looking at, we won't take pagefaults inside
>>prepare_write()/commit_write() any more.
> 
> I'sorry may be i've missed something, but how cant you prevent this?
> 
> Let's look at generic_file_buffered_write:
> #### force page fault
> fault_in_pages_readable();
> 
> ### find and lock page
>  __grab_cache_page()
> 
> #### allocate blocks.This may result in low memory condition
> #### try_to_free_pages->shrink_caches() and etc.  
> a_ops->prepare_write() 		
> 
> ### can anyone guarantee that page fault hasn't  happened by now ?

Yes. Do an atomic copy, which will early exit from the pagefault handler
and return a short copy. Then close up the write, drop the page lock,
and rerun the fault_in_pages_readable, which will do the full pagefaults
for us, then try again.

Regardless of what you do to ext3, the VM just can't handle a fault
here anyway.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.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