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:   Sat, 28 Mar 2020 22:36:07 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     "Theodore Y. Ts'o" <tytso@....edu>
Cc:     Josh Triplett <josh@...htriplett.org>, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Andreas Dilger <adilger.kernel@...ger.ca>
Subject: Re: [PATCH] ext4: Fix incorrect group count in ext4_fill_super error message

You missed the v2 patch, which was better IMHO. 

Cheers, Andreas

> On Mar 28, 2020, at 20:47, Theodore Y. Ts'o <tytso@....edu> wrote:
> 
> On Sat, Mar 28, 2020 at 02:54:01PM -0700, Josh Triplett wrote:
>> ext4_fill_super doublechecks the number of groups before mounting; if
>> that check fails, the resulting error message prints the group count
>> from the ext4_sb_info sbi, which hasn't been set yet. Print the freshly
>> computed group count instead (which at that point has just been computed
>> in "blocks_count").
>> 
>> Signed-off-by: Josh Triplett <josh@...htriplett.org>
>> Fixes: 4ec1102813798 ("ext4: Add sanity checks for the superblock before mounting the filesystem")
> 
> Applied, with a fix to the format string:
> 
>> fs/ext4/super.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>> index 0c7c4adb664e..7f5f37653a03 100644
>> --- a/fs/ext4/super.c
>> +++ b/fs/ext4/super.c
>> @@ -4288,7 +4288,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>>    if (blocks_count > ((uint64_t)1<<32) - EXT4_DESC_PER_BLOCK(sb)) {
>>        ext4_msg(sb, KERN_WARNING, "groups count too large: %u "
> 
> s/%u/%llu/
> 
>>               "(block count %llu, first data block %u, "
>> -               "blocks per group %lu)", sbi->s_groups_count,
>> +               "blocks per group %lu)", blocks_count,
>>               ext4_blocks_count(es),
>>               le32_to_cpu(es->s_first_data_block),
>>               EXT4_BLOCKS_PER_GROUP(sb));
>> -- 
>> 2.26.0
> 
>                        - Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ