Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1373036pxu; Mon, 23 Nov 2020 20:45:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/ypEuyBdxjhoB2DDh4xmHVqfi/U6vW+x2ZVJkxaczRfA1u/+h1pYPA0K32E3ua4c8sl5R X-Received: by 2002:a17:906:f186:: with SMTP id gs6mr2669393ejb.171.1606193133350; Mon, 23 Nov 2020 20:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606193133; cv=none; d=google.com; s=arc-20160816; b=ZGiLq/8Iui+FwKyr8rcw6KNM7r4URpUVLEnwL54xihSuSkj+uFjE8SxrBBdTpq8jGH MF61Fy7gVxRgQleMbqBOT/oklcVDL9/gpNMFC+WPpqvopo8HlQeq97dnB+a+9Sl5+jml tOvXJJPfV/+VFb8K1zX1UeZG9wUqQqPM4u82I0GQqFfrtEkQaNEzKtHyWnxhTFQKuV0/ TenWkJqerHZLrWViZpwzOtWlL2QwiDCtI9mVGDzH3L461O+66hqL/785egCDyug+kDJT 2GXewGx0IN/GkIOFw7dHsrrkyEmk97222Wqpd9x1yJKV0sM4ak3fjW67Y3SFYE9sgwSF Jufw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:organization:subject:cc:to:from; bh=VHn/LY3N41cBqb++YT7COFjZjSG3pyeFoNVSq3U3SLU=; b=GTXTPrYkAfTp2zWAZjmexz8hzejEEr01qPVlZ2Y58+HllDL6ugnHeXaJ0ZPmlNaEX+ qW3GGdmJqA2nJMfl/B+Ww+akne9I4z9Cq3h5r/ThUcpUSD87/W/adYMKz6SX6BXIo4Wx bBLwpKaGIGRjfzkrXiEcDYUjmpAhIEWKihyTbO+g2YWyAkCvXnd4Y5gEPsOc+CG1y+67 gldmS0mgvOPdu7WUqp4FHtLyLVx+lxIfy34kObpYT4ETadJBGoSDka36bjrWqIBKwYzW fpT8sHjMUrXHalR7/gcWkOG5KxKJ2RXKsFrkqubwldyliNWi9i+fGqXlmZbVhN0iEbTR wvZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si9243124eji.62.2020.11.23.20.45.04; Mon, 23 Nov 2020 20:45:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728291AbgKXEbM (ORCPT + 99 others); Mon, 23 Nov 2020 23:31:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgKXEbM (ORCPT ); Mon, 23 Nov 2020 23:31:12 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2B9C0613CF; Mon, 23 Nov 2020 20:31:12 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 0F22D1F44A84 From: Gabriel Krisman Bertazi To: Eric Biggers Cc: Daniel Rosenberg , "Theodore Y . Ts'o" , Jaegeuk Kim , Andreas Dilger , Chao Yu , Alexander Viro , Richard Weinberger , 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 Organization: Collabora References: <20201119060904.463807-1-drosen@google.com> <20201119060904.463807-3-drosen@google.com> <87y2iuj8y2.fsf@collabora.com> Date: Mon, 23 Nov 2020 23:31:05 -0500 In-Reply-To: (Eric Biggers's message of "Mon, 23 Nov 2020 14:30:35 -0800") Message-ID: <87blfnpe9i.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Eric Biggers 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