From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Daniel Rosenberg <drosen@google.com>,
"Theodore Y . Ts'o" <tytso@mit.edu>,
Jaegeuk Kim <jaegeuk@kernel.org>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Chao Yu <chao@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Richard Weinberger <richard@nod.at>,
linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mtd@lists.infradead.org, kernel-team@android.com
Subject: Re: [PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops
Date: Mon, 23 Nov 2020 23:31:05 -0500 [thread overview]
Message-ID: <87blfnpe9i.fsf@collabora.com> (raw)
In-Reply-To: <X7w4C8GAy+P9KNU6@sol.localdomain> (Eric Biggers's message of "Mon, 23 Nov 2020 14:30:35 -0800")
Eric Biggers <ebiggers@kernel.org> writes:
> On Sat, Nov 21, 2020 at 11:45:41PM -0500, Gabriel Krisman Bertazi wrote:
>> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>> > index 6633b20224d5..0288bedf46e1 100644
>> > --- a/fs/ext4/super.c
>> > +++ b/fs/ext4/super.c
>> > @@ -4968,11 +4968,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>> > goto failed_mount4;
>> > }
>> >
>> > -#ifdef CONFIG_UNICODE
>> > - if (sb->s_encoding)
>> > - sb->s_d_op = &ext4_dentry_ops;
>> > -#endif
>>
>> This change has the side-effect of removing the capability of the root
>> directory from being case-insensitive. It is not a backward
>> incompatible change because there is no way to make the root directory
>> CI at the moment (it is never empty). But this restriction seems
>> artificial. Is there a real reason to prevent the root inode from being
>> case-insensitive?
>>
>
> The problem is that the "lost+found" directory is special in that e2fsck needs
> to be able to find it.
>
> That's the reason why ext4 doesn't allow the root directory to be encrypted.
> (And encrypting the root directory isn't really useful anyway, since if the goal
> is to encrypt a whole filesystem with one key, dm-crypt is a better solution.)
>
> Casefolding is a bit less problematic than encryption. But it still doesn't
> entirely work, as e.g. if you name the directory "LOST+FOUND" instead (the
> directory is casefolded after all...), then e2fsck can't find it.
>
> Unless there's a real use case for the root directory being casefolded and
> people are willing to fix e2fsck, I think we should just make ext4 return an
> error when setting the casefold flag on the root directory, like it does when
> trying to enable encryption on the root directory.
I don't have a use case where I need a root directory to be CI. In
fact, when I first implemented CI, I did want to block the root directory
from being made CI, just to prevent people from doing "chattr +F /" and
complaining afterwards when /usr/lib breaks.
My concern with the curent patch was whether this side-effect was
considered, but I'm happy with either semantics.
--
Gabriel Krisman Bertazi
WARNING: multiple messages have this Message-ID (diff)
From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "Theodore Y . Ts'o" <tytso@mit.edu>,
Daniel Rosenberg <drosen@google.com>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org,
Andreas Dilger <adilger.kernel@dilger.ca>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org,
Jaegeuk Kim <jaegeuk@kernel.org>,
linux-ext4@vger.kernel.org, kernel-team@android.com
Subject: Re: [f2fs-dev] [PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops
Date: Mon, 23 Nov 2020 23:31:05 -0500 [thread overview]
Message-ID: <87blfnpe9i.fsf@collabora.com> (raw)
In-Reply-To: <X7w4C8GAy+P9KNU6@sol.localdomain> (Eric Biggers's message of "Mon, 23 Nov 2020 14:30:35 -0800")
Eric Biggers <ebiggers@kernel.org> writes:
> On Sat, Nov 21, 2020 at 11:45:41PM -0500, Gabriel Krisman Bertazi wrote:
>> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>> > index 6633b20224d5..0288bedf46e1 100644
>> > --- a/fs/ext4/super.c
>> > +++ b/fs/ext4/super.c
>> > @@ -4968,11 +4968,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>> > goto failed_mount4;
>> > }
>> >
>> > -#ifdef CONFIG_UNICODE
>> > - if (sb->s_encoding)
>> > - sb->s_d_op = &ext4_dentry_ops;
>> > -#endif
>>
>> This change has the side-effect of removing the capability of the root
>> directory from being case-insensitive. It is not a backward
>> incompatible change because there is no way to make the root directory
>> CI at the moment (it is never empty). But this restriction seems
>> artificial. Is there a real reason to prevent the root inode from being
>> case-insensitive?
>>
>
> The problem is that the "lost+found" directory is special in that e2fsck needs
> to be able to find it.
>
> That's the reason why ext4 doesn't allow the root directory to be encrypted.
> (And encrypting the root directory isn't really useful anyway, since if the goal
> is to encrypt a whole filesystem with one key, dm-crypt is a better solution.)
>
> Casefolding is a bit less problematic than encryption. But it still doesn't
> entirely work, as e.g. if you name the directory "LOST+FOUND" instead (the
> directory is casefolded after all...), then e2fsck can't find it.
>
> Unless there's a real use case for the root directory being casefolded and
> people are willing to fix e2fsck, I think we should just make ext4 return an
> error when setting the casefold flag on the root directory, like it does when
> trying to enable encryption on the root directory.
I don't have a use case where I need a root directory to be CI. In
fact, when I first implemented CI, I did want to block the root directory
from being made CI, just to prevent people from doing "chattr +F /" and
complaining afterwards when /usr/lib breaks.
My concern with the curent patch was whether this side-effect was
considered, but I'm happy with either semantics.
--
Gabriel Krisman Bertazi
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "Theodore Y . Ts'o" <tytso@mit.edu>,
Daniel Rosenberg <drosen@google.com>,
Richard Weinberger <richard@nod.at>, Chao Yu <chao@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org,
Andreas Dilger <adilger.kernel@dilger.ca>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org,
Jaegeuk Kim <jaegeuk@kernel.org>,
linux-ext4@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops
Date: Mon, 23 Nov 2020 23:31:05 -0500 [thread overview]
Message-ID: <87blfnpe9i.fsf@collabora.com> (raw)
In-Reply-To: <X7w4C8GAy+P9KNU6@sol.localdomain> (Eric Biggers's message of "Mon, 23 Nov 2020 14:30:35 -0800")
Eric Biggers <ebiggers@kernel.org> writes:
> On Sat, Nov 21, 2020 at 11:45:41PM -0500, Gabriel Krisman Bertazi wrote:
>> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>> > index 6633b20224d5..0288bedf46e1 100644
>> > --- a/fs/ext4/super.c
>> > +++ b/fs/ext4/super.c
>> > @@ -4968,11 +4968,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>> > goto failed_mount4;
>> > }
>> >
>> > -#ifdef CONFIG_UNICODE
>> > - if (sb->s_encoding)
>> > - sb->s_d_op = &ext4_dentry_ops;
>> > -#endif
>>
>> This change has the side-effect of removing the capability of the root
>> directory from being case-insensitive. It is not a backward
>> incompatible change because there is no way to make the root directory
>> CI at the moment (it is never empty). But this restriction seems
>> artificial. Is there a real reason to prevent the root inode from being
>> case-insensitive?
>>
>
> The problem is that the "lost+found" directory is special in that e2fsck needs
> to be able to find it.
>
> That's the reason why ext4 doesn't allow the root directory to be encrypted.
> (And encrypting the root directory isn't really useful anyway, since if the goal
> is to encrypt a whole filesystem with one key, dm-crypt is a better solution.)
>
> Casefolding is a bit less problematic than encryption. But it still doesn't
> entirely work, as e.g. if you name the directory "LOST+FOUND" instead (the
> directory is casefolded after all...), then e2fsck can't find it.
>
> Unless there's a real use case for the root directory being casefolded and
> people are willing to fix e2fsck, I think we should just make ext4 return an
> error when setting the casefold flag on the root directory, like it does when
> trying to enable encryption on the root directory.
I don't have a use case where I need a root directory to be CI. In
fact, when I first implemented CI, I did want to block the root directory
from being made CI, just to prevent people from doing "chattr +F /" and
complaining afterwards when /usr/lib breaks.
My concern with the curent patch was whether this side-effect was
considered, but I'm happy with either semantics.
--
Gabriel Krisman Bertazi
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-11-24 4:31 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 6:09 [PATCH v4 0/3] Add support for Encryption and Casefolding in F2FS Daniel Rosenberg
2020-11-19 6:09 ` Daniel Rosenberg
2020-11-19 6:09 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-19 6:09 ` [PATCH v4 1/3] libfs: Add generic function for setting dentry_ops Daniel Rosenberg
2020-11-19 6:09 ` Daniel Rosenberg
2020-11-19 6:09 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-22 4:55 ` Gabriel Krisman Bertazi
2020-11-22 4:55 ` Gabriel Krisman Bertazi
2020-11-22 4:55 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-11-19 6:09 ` [PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops Daniel Rosenberg
2020-11-19 6:09 ` Daniel Rosenberg
2020-11-19 6:09 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-22 4:45 ` Gabriel Krisman Bertazi
2020-11-22 4:45 ` Gabriel Krisman Bertazi
2020-11-22 4:45 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-11-23 22:30 ` Eric Biggers
2020-11-23 22:30 ` Eric Biggers
2020-11-23 22:30 ` [f2fs-dev] " Eric Biggers
2020-11-24 4:31 ` Gabriel Krisman Bertazi [this message]
2020-11-24 4:31 ` Gabriel Krisman Bertazi
2020-11-24 4:31 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-11-22 5:12 ` Gao Xiang
2020-11-22 5:12 ` Gao Xiang
2020-11-22 5:12 ` [f2fs-dev] " Gao Xiang
2020-11-23 22:51 ` Eric Biggers
2020-11-23 22:51 ` Eric Biggers
2020-11-23 22:51 ` [f2fs-dev] " Eric Biggers
2020-11-24 2:08 ` Gao Xiang
2020-11-24 2:08 ` Gao Xiang
2020-11-24 2:08 ` [f2fs-dev] " Gao Xiang
2020-11-24 4:37 ` Gabriel Krisman Bertazi
2020-11-24 4:37 ` Gabriel Krisman Bertazi
2020-11-24 4:37 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-11-26 6:20 ` Daniel Rosenberg
2020-11-26 6:20 ` Daniel Rosenberg
2020-11-26 6:20 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-19 6:09 ` [PATCH v4 3/3] f2fs: Handle casefolding with Encryption Daniel Rosenberg
2020-11-19 6:09 ` Daniel Rosenberg
2020-11-19 6:09 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blfnpe9i.fsf@collabora.com \
--to=krisman@collabora.com \
--cc=adilger.kernel@dilger.ca \
--cc=chao@kernel.org \
--cc=drosen@google.com \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.