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, 4 Jun 2010 19:11:52 +0200
From:	Jan Kara <jack@...e.cz>
To:	"J. Bruce Fields" <bfields@...ldses.org>
Cc:	Jan Kara <jack@...e.cz>, Boaz Harrosh <bharrosh@...asas.com>,
	Vladislav Bolkhovitin <vst@...b.net>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	Christof Schmitt <christof.schmitt@...ibm.com>,
	lsf10-pc@...ts.linuxfoundation.org,
	Al Viro <viro@...IV.linux.org.uk>,
	linux-fsdevel@...r.kernel.org,
	Matthew Wilcox <willy@...ux.intel.com>,
	Ric Wheeler <rwheeler@...hat.com>,
	Christoph Hellwig <hch@....de>
Subject: Re: [Lsf10-pc] [LFS/VM TOPIC] Stable pages while IO (was Wrong DIF
 guard tag on ext2 write)

On Fri 04-06-10 12:30:09, J. Bruce Fields wrote:
> On Fri, Jun 04, 2010 at 06:23:32PM +0200, Jan Kara wrote:
> > On Thu 03-06-10 19:09:52, Boaz Harrosh wrote:
> > > [Topic]
> > > How to not let pages change while in IO
> > > 
> > > [Abstract]
> > > As seen in a long thread on the fsdvel scsi mailing lists. Lots of
> > > people have headaches and sleep less nights because individual pages
> > > can change while in IO and/or DMA. Though each one as slightly different
> > > needs, the mechanics look to be the same.
> >   Hmm, I don't think it's really about "how to not let pages change" - that
> > is doable by using wait_on_page_writeback() in ->page_mkwrite and
> > ->write_begin.
> 
> Will the same work for the NFS server checksumming page data in read
> replies?
  Currently it won't. The above relies on the fact that when we clear dirty
page flag in clear_page_dirty_for_io we also write-protect the page.
Moreover I suppose you don't set PageWriteback when serving a content from
a page...
  But an elegant way to solve this would IMHO be to do:
	lock_page(page);
	if (page_mkclean(page))
		set_page_dirty(page);
  and now you can be sure that until you unlock the page it cannot be
modified because both ->page_mkwrite and ->write_begin need page lock
before they can go and modify a page...

									Honza	
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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