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:	Fri, 29 Dec 2006 03:50:50 +0100
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	David Miller <davem@...emloft.net>
Cc:	nickpiggin@...oo.com.au, kenneth.w.chen@...el.com,
	guichaz@...oo.fr, hugh@...itas.com, linux-kernel@...r.kernel.org,
	ranma@...edrich.de, torvalds@...l.org, gordonfarquharson@...il.com,
	akpm@...l.org, a.p.zijlstra@...llo.nl, tbm@...ius.com,
	arjan@...radead.org, andrei.popa@...eo.ro
Subject: Re: [PATCH] mm: fix page_mkclean_one

> I think what might be happening is that pdflush writes them out fine,
> however we don't trap writes by the application _during_ that writeout.

Yeah.  I believe that more exactly it happens if the very last
write to the page causes a writeback (due to dirty balancing)
while another writeback for the page is already happening.

As usual in these cases, I have zero proof.

> It's something that will only occur with writeback and MAP_SHARED
> writable access to the file pages.

It's the do_wp_page -> balance_dirty_pages -> generic_writepages
path for sure.  Maybe it's enough to change

                         if (wbc->sync_mode != WB_SYNC_NONE)
                                 wait_on_page_writeback(page);

                         if (PageWriteback(page) ||
                             !clear_page_dirty_for_io(page)) {
                                 unlock_page(page);
                                 continue;
                         }

to

                         if (wbc->sync_mode != WB_SYNC_NONE)
                                 wait_on_page_writeback(page);

                         if (PageWriteback(page)) {
                         	    redirty_page_for_writepage(wbc, page);
                                 unlock_page(page);
                                 continue;
                         }

                         if (!clear_page_dirty_for_io(page)) {
                                 unlock_page(page);
                                 continue;
                         }

or something along those lines.  Completely untested of course :-)


Segher

-
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