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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110517151108.GB6653@infradead.org>
Date:	Tue, 17 May 2011 11:11:08 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Jan Kara <jack@...e.cz>
Cc:	Ted Tso <tytso@....edu>, linux-ext4@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 3/3] ext4: Block mmapped writes while the fs is frozen

On Wed, May 11, 2011 at 12:29:34AM +0200, Jan Kara wrote:
> We should not allow file modification via mmap while the filesystem is
> frozen. So block in ext4_page_mkwrite() while the filesystem is frozen.
> 
> We have to check for frozen filesystem with the page marked dirty and under
> page lock with which we then return from ext4_page_mkwrite(). Only that way we
> cannot race with writeback done by freezing code - either we mark the page
> dirty after the writeback has started, see freezing in progress and block, or
> writeback will wait for our page lock which is released only when the fault is
> done and then writeback will writeout and writeprotect the page again.

This really should be done in (__)block_page_mkwrite.  I'd also return
VM_FAULT_RETRY instead of retrying inside the block_mkwrite handler
in case you hit the race.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ