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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YN0lzsMfCWli9Qp+@localhost>
Date:   Wed, 30 Jun 2021 19:17:50 -0700
From:   Josh Triplett <josh@...htriplett.org>
To:     Theodore Ts'o <tytso@....edu>
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andreas Dilger <adilger.kernel@...ger.ca>
Subject: Re: [PATCH 1/2] fs: ext4: Consolidate checks for resize of bigalloc
 into ext4_resize_begin

On Wed, Jun 30, 2021 at 08:48:04PM -0400, Theodore Ts'o wrote:
> On Thu, Jun 24, 2021 at 10:23:15AM -0400, Theodore Ts'o wrote:
> > On Mon, Jun 07, 2021 at 12:15:08PM -0700, Josh Triplett wrote:
> > > Two different places checked for attempts to resize a filesystem with
> > > the bigalloc feature. Move the check into ext4_resize_begin, which both
> > > places already call.
> > > 
> > > Signed-off-by: Josh Triplett <josh@...htriplett.org>
> > 
> > Applied, thanks.
> 
> I'm going to have to revert this change, since it breaks online
> resizing for bigalloc file system.  The issue is that
> ext4_resize_begin() is called from *three* places: for
> EXT4_IOC_GROUP_ADD, EXT4_IOC_GROUP_EXTEND, and EXT4_IOC_RESIZE_FS.
> The first two ioctls are used for the "old-style" online resize, and
> bigalloc is not supported for those two ioctls.  However, it *is*
> supposed to work for EXT4_IOC_RESIZE_FS.
> 
> Unfortunately, this just caused some tests to be skipped (assuming
> that this was an old kernel that didn't support this feature) and I
> didn't notice it right away.

Ah, I see. I didn't realize that resizing bigalloc was possible with
EXT4_IOC_RESIZE_FS; I'd assumed (incorrectly) from the error message
that it wasn't.

This patch was *purely* a side story of the second patch. I'd discovered
that the kernel couldn't successfully resize a filesystem with
sparse_super2, and wanted to catch that in the kernel and return a clear
error, rather than partially resizing the filesystem. In the course of
making that change, I noticed the two copies of the error for the
bigalloc case and tried to consolidate them.

Sorry to have missed the third case here, and no problems with the
revert. I'm hoping that the second patch can be kept as-is, assuming
there's no support for resizing sparse_super2 by any code path?

- Josh Triplett

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ