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  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, 13 Jul 2020 16:45:19 -0700
From:   Eric Sandeen <sandeen@...deen.net>
To:     Dave Chinner <david@...morbit.com>,
        Masayoshi Mizuma <msys.mizuma@...il.com>
Cc:     "J. Bruce Fields" <bfields@...ldses.org>,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        Christoph Hellwig <hch@...radead.org>,
        Theodore Ts'o <tytso@....edu>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Masayoshi Mizuma <m.mizuma@...fujitsu.com>,
        linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-xfs <linux-xfs@...r.kernel.org>
Subject: Re: [PATCH] fs: i_version mntopt gets visible through /proc/mounts

On 6/18/20 3:39 PM, Dave Chinner wrote:
> On Wed, Jun 17, 2020 at 11:45:35PM -0400, Masayoshi Mizuma wrote:

...

>> Thank you for pointed it out.
>> How about following change? I believe it works both xfs and btrfs...
>>
>> diff --git a/fs/super.c b/fs/super.c
>> index b0a511bef4a0..42fc6334d384 100644
>> --- a/fs/super.c
>> +++ b/fs/super.c
>> @@ -973,6 +973,9 @@ int reconfigure_super(struct fs_context *fc)
>>                 }
>>         }
>>
>> +       if (sb->s_flags & SB_I_VERSION)
>> +               fc->sb_flags |= MS_I_VERSION;
>> +
>>         WRITE_ONCE(sb->s_flags, ((sb->s_flags & ~fc->sb_flags_mask) |
>>                                  (fc->sb_flags & fc->sb_flags_mask)));
>>         /* Needs to be ordered wrt mnt_is_readonly() */
> 
> This will prevent SB_I_VERSION from being turned off at all. That
> will break existing filesystems that allow SB_I_VERSION to be turned
> off on remount, such as ext4.
> 
> The manipulations here need to be in the filesystem specific code;
> we screwed this one up so badly there is no "one size fits all"
> behaviour that we can implement in the generic code...

I wandered back into this thread for some reason ... ;)

Since iversion/noiversion is /already/ advertised as a vfs-level mount option,
wouldn't exposing it in /proc/mounts solve the original problem here?

("i_version" is wrong, because it's ext4-specific, but "iversion" is handled
by the vfs, so it's meaningful for any filesystems, and it will also trivially
allow mount(2) to preserve it across remounts for all filesystems that set it by
default.)

Seems like that's the fastest path to fixing the current problems, even if a
long-term goal may be to deprecate it altogether.

-Eric

Powered by blists - more mailing lists