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, 17 Mar 2018 23:39:48 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Kazuya Mio <k-mio@...jp.nec.com>
Cc:     "adilger.kernel@...ger.ca" <adilger.kernel@...ger.ca>,
        "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] libext2fs: fix to read the bitmaps for image file
 correctly

On Wed, Mar 14, 2018 at 05:47:00AM +0000, Kazuya Mio wrote:
> When read_bitmaps() is called to read block/inode bitmap from the image file
> created by e2image, it can read only one bitmap block due to the wrong
> loop condition. read_bitmaps() doesn't need to split the code between
> the filesystem and the image file, so remove EXT2_FLAG_IMAGE_FILE-specific code.

I see the bug you are trying to fix, but I'll note that your patch has
the following changes from the orignial code

1) It causes the I/O patterns to be much more seeky, since we are
jumping back and forth between the inode bitmap portion of the image
file and block bitmap portion of the image file.  The original code
read the bitmaps using sequential reads, which allows the readahead
code to more efficiently read the information from disk.

2) It forces a metadata checksum check where previously we were not
doing one.  This could make a difference if someone performs an
e2image snapshot of a life file system, for example.

It might be better to add two new variables which are initalized to
{block,inode}_nbytes multipled by the number of block groups, and fix
the loop condition, and keep the existing code.

Regards,

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ