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]
Message-ID: <9d3ad717-e3c2-69c8-4ef0-3f5f24c4ae1c@huawei.com>
Date:   Thu, 30 Mar 2023 10:56:59 +0800
From:   zhanchengbin <zhanchengbin1@...wei.com>
To:     Theodore Ts'o <tytso@....edu>
CC:     <linux-ext4@...r.kernel.org>, <linfeilong@...wei.com>,
        <louhongxiang@...wei.com>, <liuzhiqiang26@...wei.com>
Subject: Re: [PATCH 0/2] Add some msg for io error


On 2023/3/26 22:31, Theodore Ts'o wrote:
> On Sat, Mar 25, 2023 at 02:56:50PM +0800, zhanchengbin wrote:
>> If there is an EIO during the process of fsck, the user can be notified of it.
> 
> Can you identify a code path where the user is *not* getting notified
> while e2fsck is running without this patch series?
> 
> The unix_io.c module calls fsync() through unix_flush() only.  When
> unix_write_byte() calls flush_cached blocks(), if the read or write
> system call fails, the error will be returned to the caller of
> flush_cached_byte(), and the unix_write_byte() will return the error
> back to the caller (in this case, e2fsck).
> 

io_channel_flush and io_channel_write_byte do have return values, but
they may not necessarily be checked at their calling points. As in the
following path:

e2fsck_run_ext3_journal
  ext2fs_flush // Ignore errors.
   ext2fs_flush2
    io_channel_flush
  ext2fs_mmp_stop // Ignore errors.
   ext2fs_mmp_write
    io_channel_flush

ext2fs_flush // Many calls ignore errors.
  ext2fs_flush2
   write_primary_superblock
    io_channel_write_byte

Thanks,
  - bin.

> So in both cases, e2fsck checks the error return from ext2fs_flush()
> (which is the only place where write_byte gets called) and
> io_channel->flush(), and so the user will get some kind of error
> report already.
> 
> The error message might not identify exactly what I/O failed, but the
> "Error sync" message that this commit series provides is not going to
> be much better.
> 
> 						- Ted
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ