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:	Thu, 21 Jul 2011 22:57:25 +0800
From:	Yongqiang Yang <xiaoqiangnk@...il.com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH V2] e2fsprogs: add ext2fs_group_blocks_count helper

On Thu, Jul 21, 2011 at 9:55 PM, Eric Sandeen <sandeen@...hat.com> wrote:
> On 7/20/11 4:57 PM, Eric Sandeen wrote:
>> Code to count the number of blocks in the last partial
>> group is cut and pasted around the e2fsprogs codebase, and
>> is wrong in at least one instancem as pointed out by
>> Yongqiang Yang (but not fixed in this patch).
>>
>> Making this a helper function should improve matters.
>>
>> Signed-off-by: Eric Sandeen <sandeen@...hat.com>
>> ---
>
> Argh V3 coming today, I got a little too fast and loose sending this one
> at the end of the day yesterday didn't I:
Hi Eric,

It seemed you did not send out the v3 patch.   You just pointed out
what to be added in the V3 patch.

Yongqiang.
>
>> @@ -499,18 +499,8 @@ retry:
>>               ext2fs_bg_flags_zap(fs, i);
>>               if (csum_flag)
>>                       ext2fs_bg_flags_set(fs, i, EXT2_BG_INODE_UNINIT | EXT2_BG_INODE_ZEROED);
>> -             if (i == fs->group_desc_count-1) {
>> -                     numblocks = (ext2fs_blocks_count(fs->super) -
>> -                                  fs->super->s_first_data_block) %
>> -                                          fs->super->s_blocks_per_group;
>> -                     if (!numblocks)
>> -                             numblocks = fs->super->s_blocks_per_group;
>> -             } else {
>> -                     numblocks = fs->super->s_blocks_per_group;
>> -                     if (csum_flag)
>> -                             ext2fs_bg_flags_set(fs, i,
>> -                                                 EXT2_BG_BLOCK_UNINIT);
>
> still need to do that flag set with the new helper.
>
> - Eric
>
>> -             }
>> +
>> +             numblocks = ext2fs_group_blocks_count(fs, i);
>>
>>               has_super = ext2fs_bg_has_super(fs, i);
>>               if (has_super) {
>>
>> --
>> 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
>
>



-- 
Best Wishes
Yongqiang Yang
--
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