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] [day] [month] [year] [list]
Date:	Fri, 22 Feb 2008 00:49:29 +0530
From:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To:	Mingming Cao <cmm@...ibm.com>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH -v2] ext4: Use page_mkwrite vma_operations to get mmap
	write notification.

On Thu, Feb 21, 2008 at 09:39:20AM -0800, Mingming Cao wrote:
> On Tue, 2008-02-19 at 09:13 +0530, Aneesh Kumar K.V wrote:
> > We would like to get notified when we are doing a write on mmap section.
> > This is needed with respect to preallocated area. We split the preallocated
> > area into initialzed extent and uninitialzed extent in the call back. This
> > let us handle ENOSPC better. Otherwise we get ENOSPC in the writepage and
> > that would result in data loss. The changes are also needed to handle ENOSPC
> > when writing to an mmap section of files with holes.
> > 
> 
> Hi Aneesh,
> 
> I have a concern, it seems we missed journalling the allocation activity
> for the mmaped write. See comments below...
> 
> Another thing, perhaps similar patch should be ported to ext2/3, as this
> also addressed the mmaped write ENOSPC error without
> preallocation/deleyed allocation.
> 
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>

......

> > +
> > +int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page)
> > +{
> > +	return block_page_mkwrite(vma, page, ext4_get_block);
> > +}
> > +
> 
> I don't see block allocation being journalled here. block_page_mkwrite()
> eventually calling block_prepare_write() which invokes ext4_get_block()
> without starting a new journal handle.
> 
> Perhaps call ext4 write_begin() and write_end() inode operations, that
> would taking care of different write_begin and write_end for three
> different journalling mode.
> 

You are correct. I missed the journalling details when working on the
patch. Will send the one with fix.


-aneesh
-
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