Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <krisman@suse.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Daniel Rosenberg <drosen@google.com>,
	 Todd Kjos <tkjos@google.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	 stable <stable@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>
Subject: Re: f2fs: Introduce linear search for dentries
Date: Mon, 10 Feb 2025 16:21:16 -0500	[thread overview]
Message-ID: <87pljpxzqr.fsf@mailhost.krisman.be> (raw)
In-Reply-To: <20250208053011.GK1130956@mit.edu> (Theodore Ts'o's message of "Sat, 8 Feb 2025 00:30:11 -0500")

"Theodore Ts'o" <tytso@mit.edu> writes:

> Now, I'm not sure how much it's important to bring back the reverted
> patch.  Yes, I know it's claimed that it fixes a "security issue", but
> in my opinion, it's pretty bullshit worry.  First, almost no one uses
> the case folded feature other than Android, and second, do you
> *really* think someone will really be trying to run git under Termux
> on their Pixel 9 Pro Fold?  I mean.... I guess; I do have Termux
> installed on my P9PF, but even I'm not crazy enough to try install
> git, emacs, gcc, etc., on an Android phone and expect to get aything
> useful done.  Using ssh, or mosh, with Termux, sure.  But git?  Not
> convinced....
>
> Anyway, if we *do* want bring back the reverted patch, it would need
> to be reworked so that there is a bit in the encoding flags which
> indicates how we are treating Unicode "ignorable" characters, so that
> e2fsprogs and f2fs-tools can do the right thing.  Once the kernel can
> handle things with and without ignorable characters, on a switchable
> basis based on a bit in the superblock, then we wouldn't need to use
> the linear fallback hack, with the attendant performance penalty.
>
> But honestly, I'm not sure it worth it.  But if someone sends me a
> patch which handles the switchable unicode casefold, I'm willing to
> spend time to get this integrated into e2fsprogs.

What I think would be a correct approach for commit 5c26d2f1d3f5
("unicode: Don't special case ignorable code points") is to fold *some*
code points: zero-length characters like ZWSP are folded as they should
be, but we limit the list to not normalize those characters that make
some sense, like the Variant Selectors.  This would be similar to what
APFS seems to do.  This would be complex, but the user-visible semantics
would be slightly more sane. It should be done with caution, with a bit
marking this change and preserving the current unicode database, to
prevent further breakage.  But given the damage this apparent simple
patch has caused already, I myself won't pursue that without a real
security motivation.

Thanks for the linear search patches.  Not great, but it solves the
current situation. For your ext4 patch:

Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>

-- 
Gabriel Krisman Bertazi

      reply	other threads:[~2025-02-10 21:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 21:49 f2fs: Introduce linear search for dentries Daniel Rosenberg
2025-02-01  8:28 ` Greg KH
2025-02-01 17:06   ` Todd Kjos
2025-02-03 23:07     ` Daniel Rosenberg
2025-02-04 11:32       ` Greg KH
2025-02-04 11:33         ` Greg KH
2025-02-04 21:24           ` Daniel Rosenberg
2025-02-05  4:41       ` Theodore Ts'o
2025-02-08  5:30       ` Theodore Ts'o
2025-02-10 21:21         ` Gabriel Krisman Bertazi [this message]

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=87pljpxzqr.fsf@mailhost.krisman.be \
    --to=krisman@suse.de \
    --cc=drosen@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=stable@vger.kernel.org \
    --cc=tkjos@google.com \
    --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