Re: [PATCH 7/7] libext2fs: enforce the block group descriptor size in ext2fs_open()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-07-31, at 13:09, Theodore Ts'o <tytso@xxxxxxx> wrote:
> On Tue, Jul 31, 2012 at 11:38:47AM -0700, Andreas Dilger wrote:
>>> +    /* Enforce the block group descriptor size */
>>> +    if (fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) {
>>> +        if (fs->super->s_desc_size != EXT2_MIN_DESC_SIZE_64BIT) {
>> 
>> It doesn't necessarily make sense to limit this to the minimum size, only that it is at least the minimum size. 
> 
> I'm not at all convinced that the ext2fs library will do the right
> thing if the block group size is larger than what we expect.  At the
> very least we need to make sure it is a power of two, but even so I'd
> want to audit the code and do some experiments before I would hang my
> hat on this actually working correctly...

I'm pretty sure that we've always checked that it is a power-of-two value. The problem with this change is that it makes it much harder to increase the size again in the future .

It would definitely need another feature flag, but it isn't clear without more investigation (that i can't do on my phone) if a COMPAT flag would be enough (which we would likely have anyway if we needed a larger descriptor) or if we need a more restrictive feature flag. 

Cheers, Andreas--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux