linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sarthak Kukreti via Linux-f2fs-devel"
	<linux-f2fs-devel@lists.sourceforge.net>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [f2fs-dev] [PATCH v2 1/3] libfs: reject casefolded names that fold to ".", "..", or empty
Date: Thu, 19 Nov 2026 22:10:44 +0000	[thread overview]
Message-ID: <sashiko-outbox-224119@kernel.org> (raw)
In-Reply-To: <20261119214944.1480596-2-sarthakkukreti@google.com>

> Unicode normalization and casefolding (utf8_casefold()) strips code
> points with the Default_Ignorable_Code_Point property. As a result:
> 
> 1. A filename consisting of "." or ".." followed by ignorable characters
>    (e.g. ".\xe2\x80\xae" or "..\xe2\x80\xae") bypasses VFS special-entry
>    handling during path walk, but casefolds to "." or "..".
> 2. A filename consisting solely of ignorable characters (e.g.
>    "\xe2\x80\xae") casefolds to the empty string "" (length 0), causing
>    any two distinct ignorable-only filenames to compare and hash as
>    equal.
> 
> Update generic_ci_d_hash(), generic_ci_match(), and
> generic_ci_validate_strict_name() to reject case-insensitive hashing,
> matching, and creation of filenames that casefold to "", ".", or "..",
> while preserving exact byte-equality matches (such as NFS export lookups
> of literal ".."). Using a 3-byte stack buffer with utf8_casefold()
> detects all three cases in O(1) space without heap allocations.
> 
> Fixes: b886ee3e778e ("ext4: Support case-insensitive file name lookups")
> Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups")
> Fixes: c843843e714c ("fs: Add standard casefolding support")
> Co-developed-by: Dmitry Torokhov <dtor@google.com>
> Signed-off-by: Dmitry Torokhov <dtor@google.com>
> Signed-off-by: Sarthak Kukreti <sarthakkukreti@google.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119214944.1480596-1-sarthakkukreti@google.com?part=1


  reply	other threads:[~2026-11-19 22:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 21:49 [PATCH v2 0/3] fs: reject casefolded names that fold to ".", "..", or empty Sarthak Kukreti
2026-11-19 21:49 ` [PATCH v2 1/3] libfs: " Sarthak Kukreti
2026-11-19 22:10   ` sashiko-bot [this message]
2026-11-19 21:49 ` [PATCH v2 2/3] ext4: " Sarthak Kukreti
2026-11-19 21:55   ` sashiko-bot
2026-11-19 21:49 ` [PATCH v2 3/3] f2fs: " Sarthak Kukreti
2026-11-19 21:53   ` sashiko-bot

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=sashiko-outbox-224119@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).