Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4491891pxf; Tue, 30 Mar 2021 09:04:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFX03kRvwlU9LaKUY2lGPwEdIzAxcFg7DmkuoHoNJwQGPUItKmxUnvNNFWkz1vOKdwXJb3 X-Received: by 2002:a17:907:33cd:: with SMTP id zk13mr33965256ejb.224.1617120287582; Tue, 30 Mar 2021 09:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617120287; cv=none; d=google.com; s=arc-20160816; b=Q/MrT8e7Ee7q9QiowaoGZunk5bX4It0mpdAhvOcscn+hkEQmcM8XcbOZxgmVSQJl7X Ofb4zKP9UmBIY3SRaYAL1oOrLhEZueuix/UJQrbRSjOUbW4e3R9TtH2RRrYOc2ojRlix 8Acj0l9CSr48QbM+hGRs5ZPp6YWGOB67z7GUm04nEOndT+GdgySAYgNexIRSeKzS7EXW PY8AT1g7R5fECxxG7bBzf7ismdRIvoSkQ4z6VPBLtrzOxBBQ6LG/hLeX5gXMqwhYqceW lvsBxFPSlryinaI3t83O9giWhO3ZiaXGGthjhY0RisaJ5T84MFEuNugeAY/dyyrqxN6g ym0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EdzCFCLMvvg0RnoP86wisrN9O1agsv+ZeQ7KKgGHrn0=; b=X60YFChYqPBK+mNgtsuxL66/uqruaeFtX+pkiPfAFDBFnAcOtqAJWLtm67C/CXCOsF hJhEFGNR4oOWIfagFhQ2gpGgonwG2jwQ3xA0yHceLNisvyRzaSjU66HDYycHwOZzdUQA WZ80vuuuXpEaI6LeW35A+WPM+XRq2CEnL4wRjc/M7OxvAWoUpJxS0umfz9+vZ9y7Y/F5 wfqd3wUl59V2/PKiLBBPieAObGyXYHnUlcFVxfzfAQ41E2zlLF3Nn3cIC0J3ucN81sc1 qF4bm4Qj/uvQiF/qfGb7GeCai+sI7LwVwIyxoHJZll3qeSDYNdXpZOQUDZ5gefRD66b/ fMHw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w26si15256818edx.572.2021.03.30.09.04.20; Tue, 30 Mar 2021 09:04:47 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232183AbhC3QCU (ORCPT + 99 others); Tue, 30 Mar 2021 12:02:20 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:55237 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231794AbhC3QBs (ORCPT ); Tue, 30 Mar 2021 12:01:48 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 12UG0nHa013090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Mar 2021 12:00:49 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 32C5415C39CD; Tue, 30 Mar 2021 12:00:49 -0400 (EDT) Date: Tue, 30 Mar 2021 12:00:49 -0400 From: "Theodore Ts'o" To: Eric Biggers Cc: Gabriel Krisman Bertazi , Shreeya Patel , adilger.kernel@dilger.ca, jaegeuk@kernel.org, chao@kernel.org, drosen@google.com, yuchao0@huawei.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, kernel@collabora.com, andre.almeida@collabora.com Subject: Re: [PATCH v5 4/4] fs: unicode: Add utf8 module and a unicode layer Message-ID: References: <20210329204240.359184-1-shreeya.patel@collabora.com> <20210329204240.359184-5-shreeya.patel@collabora.com> <87v999pequ.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Mar 29, 2021 at 10:47:52PM -0700, Eric Biggers wrote: > > Isn't this a user problem? If the modules required to boot are on the > > filesystem itself, you are in trouble. But, if that is the case, your > > rootfs is case-insensitive and you gotta have utf8 as built-in or have > > it in an early userspace. > > We could make it the user's problem, but that seems rather unfriendly. > Especially because the utf8 module would be needed if the filesystem has the > casefold feature at all, regardless of whether any casefolded directories are > needed at boot time or not. (Unless there is a plan to change that?) I guess I'm not that worried, since the vast majority of desktop distribution are using initial ramdisks these days. And if someone did build a monolithic kernel that couldn't mount the root file system, they would figure that out pretty quickly. The biggest problem they would have with trying to enable encryption or casefolding on the root file system is that if they are using Grub, older versions of Grub would see an unknown incompat feature, and immediately have heartburn, and refuse to touch whatever file system /boot is located on. If the distribution has /boot as a stand-alone partition, that won't be a problem, but if you have a single file system which includes the location of kernels and initrds' are located, the moment you try set the encryption or casefold on the file system, you're immediately hosed --- and if you do this on a laptop while you are on an airplane, without thinking things through, and without access to a rescue USB thumb drive, life can get... interesting. (Why, yes, I'm speaking from direct experience; why do you ask? :-) So in comparison to making such a mistake, building a kernel that was missing casefold, and needing to fall back to an older kernel is not really that bad of a user experience. You just have to fall back the distro kernel, which most kernel developers who are dogfooding bleeding kernels are probably smart enough keep one around. We *could* teach ext4 to support mounting file systems that have casefold, without having the unicode module loaded, which would make things a bit better, but I'm not sure it's worth the effort. We could even make the argument that letting the system boot, and then having access to some directories return ENOTSUPP would actually be a more confusing user experience than a simple hard failure when we try mounting the file system. Cheers, - Ted