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:   Mon, 20 Mar 2023 13:44:44 +0100
From:   Jan Kara <jack@...e.cz>
To:     Kemeng Shi <shikemeng@...weicloud.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] ext4: improve inode table blocks counting in
 ext4_num_overhead_clusters

On Tue 21-02-23 19:59:19, Kemeng Shi wrote:
> As inode table blocks are contiguous, inode table blocks inside the
> block_group can be represented as range [itbl_cluster_start,
> itbl_cluster_last]. Then we can simply account inode table cluters and
> check cluster overlap with [itbl_cluster_start, itbl_cluster_last] instead
> of traverse each block of inode table.
> By the way, this patch fixes code style problem of comment for
> ext4_num_overhead_clusters.
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>

FWIW this is triggering Coverity warning:

*** CID 1536792:  Uninitialized variables  (UNINIT)
/fs/ext4/balloc.c: 153 in ext4_num_overhead_clusters()
147                     inode_cluster = EXT4_B2C(sbi,
148                                              ext4_inode_bitmap(sb, gdp) - st
149                     /*
150                      * Additional check if inode bitmap is in just accounted
151                      * block_cluster
152                      */
>>>     CID 1536792:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "block_cluster".
153                     if (inode_cluster != block_cluster &&
154                         inode_cluster >= base_clusters &&
155                         (inode_cluster < itbl_cluster_start ||
156                         inode_cluster > itbl_cluster_end))
157                             num_clusters++;
158             }

which actually looks valid AFAICT.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ