Re: [PATCH 1/3] libfs: reject casefolded names that fold to ".", "..", or empty

From: Theodore Tso

Date: Mon Nov 16 2026 - 21:00:43 EST


On Mon, Nov 16, 2026 at 02:34:26PM -0500, Gabriel Krisman Bertazi wrote:
> Either way, this issue is another example of why treating ignorable code
> points as 0-length strings was a bad idea. I'd very much rather
> utf8_casefold would treat all ignorable code points as foldable to
> themselves, (i.e. commit 5c26d2f1d3f5 ("unicode: Don't special case
> ignorable code points")), but that was tried and broke applications
> that relied on variant selectors code-points being ignored.

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.

I'd prefer to simply reject creating them with an EINVAL, but it's
likely that will break those stupid applications....

Eventually we can have e2fsck offer to fix directories with those
characters, and eventually we can make these characters become a bad
memory.

The other question is what *other* evil misdesigns are in the unicode
spec that we should be preactively trying to addressw hile we're at it?

- Ted