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:   Thu, 07 Jul 2022 16:16:21 -0400
From:   Gabriel Krisman Bertazi <krisman@...labora.com>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     Slava Bacherikov <slava@...her09.org>, tytso@....edu,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH v2] tune2fs: allow disabling casefold feature

Eric Biggers <ebiggers@...nel.org> writes:

> On Thu, Jul 07, 2022 at 10:04:56PM +0300, Slava Bacherikov wrote:
>> +	if (FEATURE_OFF(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD)) {
>> +		if (mount_flags & EXT2_MF_MOUNTED) {
>> +			fputs(_("The casefold feature may only be disabled when "
>> +				"the filesystem is unmounted.\n"), stderr);
>> +			return 1;
>> +		}
>> +		if (has_casefold_inode(fs)) {
>> +			fputs(_("The casefold feature couldn't be disabled when "
>> +					"there are inodes with +F flag.\n"), stderr);
>> +			return 1;
>> +		}
>> +		enabling_casefold = 0;
>
> Likewise, "couldn't" => "can't".
>
> Also, what are the semantics of disabling casefold, exactly?  Do the encoding
> and encoding flags fields in the superblock also get cleared?

The kernel is able to ignore the non-zero encoding field if the feature
is not set, but we definitely don't want to rely on that.  The patch
should explicitly zero both s_encoding and s_encoding_flags.

-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ