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-next>] [day] [month] [year] [list]
Date:	Tue, 09 Apr 2013 17:38:21 +0400
From:	Dmitry Monakhov <dmonakhov@...nvz.org>
To:	ext4 development <linux-ext4@...r.kernel.org>,
	Jan Kara <jack@...e.cz>, Theodore Ts'o <tytso@....edu>
Subject: ext4 stable page writes question


According to stable write assumptions (1d1d1a767206fb)
grab_cache_page_write_begin() now calls relaxed method wait_for_stable_page()
which will wait for writeback to finish only if bdi demand that.
Commit message states that ext4 may not wait
But there are a lot of write-paths where we expect that:
BUG_ON(!PageLocked(page));
BUG_ON(PageWriteback(page));
And the only reason we avoid this bugon is because of commit 47564bfb95b
which use following trick to avoid lock inversion over journal_start:
page = grab_cache_page_write_begin()
unlock_page(page);
ext4_journal_start()
lock_page(page);
wait_on_page_writeback(page); <<<< unconditional wait

So as far as I understand this was done just by occasion because
ext4_page_mkwrite() use wait_for_stable_page().

So here is my question:  Do we have to wait for page's writeback to
finish for all write paths in ext4 code or we may use
wait_for_stable_page() and should cleanup all places where 
we may trigger BUG_ON(PageWriteback(page));
 
--
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