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]
Message-ID: <4A67D36D.20708@redhat.com>
Date:	Wed, 22 Jul 2009 22:05:17 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Frank Mayhar <fmayhar@...gle.com>
CC:	Andreas Dilger <adilger@....com>,
	Curt Wohlgemuth <curtw@...gle.com>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: Question on fallocate/ftruncate sequence

Frank Mayhar wrote:
> On Tue, 2009-07-21 at 15:54 -0600, Andreas Dilger wrote:

...

>> That said, we might need to have some kind of flag in the on-disk
>> inode to indicate that it was preallocated beyond EOF.  Otherwise,
>> e2fsck will try and extend the file size to match the block count,
>> which isn't correct.  We could also use this flag to determine if
>> truncate needs to be run on the inode even if the new size is the
>> same.
> 
> After chatting with Curt about this today, it sounds like this needs two
> things.  One is your flag in the on-disk inode, set in fallocate() to
> indicate that it has an allocation past EOF.  E2fsck would use this to
> avoid "fixing" the file size to match the block count.  Truncate would
> use this to notice that there are blocks allocated past i_size and get
> rid of them.  It would be cleared by truncate or by ext4_get_blocks when
> using the last block of such an allocation.
> 
> Does this make sense?  Have I missed anything?

I guess I'm not totally sold on the new on-disk flag; we can work out
blocks past EOF w/o needing a new flag can't we?

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