From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=18.9.28.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794927303; b=k5z+bpVXdh1wtCu9uOXIsJbDe1FlwBLCoyn99NTeIJuOu4lh/9jB7KNuPZSXxRxxF/RJ cB2Ch+l/iLHSISIO3l6QphiMrHW2hFrNUPFrGzGVtVeP8da/JC8tp6f0K13Wb9HhTxUe8 71yl+/+AH0SzBSnFgVFw70cHd93WZDhM05fpnmmvl7IcpIlmVuC51x2FbUTNEX7/lJR1/ ogUsad6H0BZ2i91MjbYfnWFTZhPv//jPxvocwbWfJSryN7RCa8LRSz2tnagNrS429Za72 fYO9lTh9hXn/3MI5GUzQvqh74lIx6jtnFM/IHhumOryQyFAgj/UY1KzmU08ZPYsNueA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794927303; h=DMARC-Filter:Received:DKIM-Signature:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=JZ67Ln6ziaBPsKaIzdqErWNCSGgvnSYlqc/yhQf9HX0=; b=o1uHFeWOVTKBj9BT3kdL47LdGPqh+vkr/svCkuRAA+/2D5HRDQBaTdVJuwsWLzmCoXdf 7/9DxA/Z54E1Ssl+Emb1BzkZmJMGdonxmVkzrD4edfX//G4gBIFRFWN/20H9rDlhj/p5c sQK0Q6v022IzkGYTqejHbQ4CxNCKeF1lSWGnsYgs/9oQSl8tqVA8a/2QLT+61cZp+EkHn UmC88dD7ovdM3Dkc9CEbtMFq8t4UCAsuE7F274aaTacZI0s0NK8NMY5/c6FLhIYjbeMX8 CDT2OsrAYR3U4Ir7yu/WnIbCXQEwqIKo4/O1jFce2TfY7naIqBWGmbnPibQLnH5hwhQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass header.d=mit.edu header.i=@mit.edu header.a=rsa-sha256 header.s=outgoing header.b=cxPrl4Mm; arc=none smtp.remote-ip=18.9.28.11 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DE85606A330 for ; Tue, 17 Nov 2026 14:55:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0DE85606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.a=rsa-sha256 header.s=outgoing header.b=cxPrl4Mm Received: from macsyma.thunk.org (c-73-9-28-129.hsd1.il.comcast.net [73.9.28.129]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 6AHEsWAV025356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Nov 2026 09:54:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1794927277; bh=JZ67Ln6ziaBPsKaIzdqErWNCSGgvnSYlqc/yhQf9HX0=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=cxPrl4Mm1T30CBSddcZy5wnEp6gC/wd8ru0R7LA87M2l8dJaIPqQsiEnyxIe2ZUCU eygzAr76BDUzp/18d24nDpDp54kiP9TiW4gx5pRs2JjFcjPA2j8s0FhAxU1sBKC/Ns 2wYcU39Se3OKsn0M4KHgbKq8MaZ9WrdqgSJ8RVv/BGGfvXOLpNvakevm0PinCI5Lqq 160eXk9lwAXj4dwMpeqCKzXwGRdgDLChvNGzx5Zs/A3xWNx0h5c43cHAOednZoLbE4 mItAna7bt2OFZ55xE4AomDkNmIffUWVZKGnCZE56UOJ0rloMcwNFABBHIPxd8yFtoN 95wDlCS2Zo9hQ== Received: by macsyma.thunk.org (Postfix, from userid 15806) id A03EE27D8EC8; Tue, 17 Nov 2026 09:54:32 -0500 (EST) Date: Tue, 17 Nov 2026 09:54:32 -0500 From: "Theodore Tso" To: David Laight Cc: Gabriel Krisman Bertazi , Sarthak Kukreti , Jaegeuk Kim , Chao Yu , Alexander Viro , Christian Brauner , Gabriel Krisman Bertazi , Eric Biggers , Dmitry Torokhov , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] libfs: reject casefolded names that fold to ".", "..", or empty Message-ID: References: <20261113065332.929085-1-sarthakkukreti@google.com> <20261113065332.929085-2-sarthakkukreti@google.com> <878q2swoxp.fsf@cartola> <20261117084727.0cfa196a@pumpkin> X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261117084727.0cfa196a@pumpkin> On Tue, Nov 17, 2026 at 08:47:27AM -0500, David Laight wrote: > > Sigh... I really think these characters are *evil*. I wonder if we > > should simply drop those code points unconditionally when they are fed > > to the kernel --- not only folding to themselves, but *not* preserving > > them when a misguided application tries to create a file with one of > > these misbegotten Unicode charactesr. > > Doesn't that assume that filenames are UTF8 rather than just sequences > of bytes with everything except '\0' and '/' being valid. > Casefolding is itself so evil/impossible it shouldn't have been allowed. We would only do this if casefolding is enabled. For better or for worse, it's better than what it replaced which was this terrible wrapfs hack that was a trivial to trigger deadlocks using fsstress --- which was even more evil. The other way we can deal with this is that if case folding is enabled, we change the VFS to call the case-folding for incoming filename *before* it does its special case checking for '.' and '..' if casefolding is enabled. - Ted