public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: cem@kernel.org, linux-xfs@vger.kernel.org, david@fromorbit.com
Subject: Re: [PATCH 4/6] xfs_db: fix metadump name obfuscation for ascii-ci filesystems
Date: Tue, 11 Apr 2023 08:35:46 -0700	[thread overview]
Message-ID: <20230411153546.GH360889@frogsfrogsfrogs> (raw)
In-Reply-To: <ZDTpBtMlSsxRJjRh@infradead.org>

On Mon, Apr 10, 2023 at 09:58:46PM -0700, Christoph Hellwig wrote:
> On Wed, Apr 05, 2023 at 05:09:55PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Now that we've stabilized the dirent hash function for ascii-ci
> > filesystems, adapt the metadump name obfuscation code to detect when
> > it's obfuscating a directory entry name on an ascii-ci filesystem and
> > spit out names that actually have the same hash.
> 
> Between the alloc use, the goto jumping back and the failure to
> obsfucate some names this really seems horribly ugly.  I could
> come up with ideas to fix some of that, but they'd be fairly invasive.

Given that it's rol7 and xoring, I'd love it if someone came up with a
gentler obfuscate_name() that at least tried to generate obfuscated
names that weren't full of control characters and other junk that make
ls output horrible.

Buuuut doing that requires a deep understanding of how the math works.
I think I've almost grokked it, but applied math has never been my
specialty.  Mark Adler's crc spoof looked promising if we ever follow
through on Dave's suggestion to change the dahash to crc32c, but that's
a whole different discussion.

> Is there any reason we need to support obsfucatation for ascii-ci,
> or could we just say we require "-o" to metadump ascii-ci file systems
> and not deal with this at all given that it never actually worked?

That would be simpler for metadump, yes.

I'm going to introduce a followup series that adds a new xfs_db command
to generate obfuscated filenames/attrs to exercise the dabtree hash
collision resolution code.  I should probably do that now, since I
already sent xfs/861 that uses it.

It wouldn't be the end of the world if hashcoll didn't work on asciici
filesystems, but that /would/ be a testing gap.

--D

  reply	other threads:[~2023-04-11 15:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  0:02 [PATCHSET v2 0/4] xfs: fix ascii-ci problems, then kill it Darrick J. Wong
2023-04-06  0:02 ` [PATCH 1/4] xfs: stabilize the dirent name transformation function used for ascii-ci dir hash computation Darrick J. Wong
2023-04-11  4:50   ` Christoph Hellwig
2023-04-06  0:03 ` [PATCH 2/4] xfs: test the ascii case-insensitive hash Darrick J. Wong
2023-04-11  4:50   ` Christoph Hellwig
2023-04-06  0:03 ` [PATCH 3/4] xfs: use the directory name hash function for dir scrubbing Darrick J. Wong
2023-04-11  4:51   ` Christoph Hellwig
2023-04-06  0:03 ` [PATCH 4/4] xfs: deprecate the ascii-ci feature Darrick J. Wong
2023-04-11  4:52   ` Christoph Hellwig
2023-04-06  0:09 ` [PATCHSET v2 0/6] xfsprogs: fix ascii-ci problems, then kill it Darrick J. Wong
2023-04-06  0:09   ` [PATCH 1/6] xfs: stabilize the dirent name transformation function used for ascii-ci dir hash computation Darrick J. Wong
2023-04-06  0:09   ` [PATCH 2/6] xfs: test the ascii case-insensitive hash Darrick J. Wong
2023-04-06  0:09   ` [PATCH 3/6] xfs_db: move obfuscate_name assertion to callers Darrick J. Wong
2023-04-11  4:52     ` Christoph Hellwig
2023-04-06  0:09   ` [PATCH 4/6] xfs_db: fix metadump name obfuscation for ascii-ci filesystems Darrick J. Wong
2023-04-11  4:58     ` Christoph Hellwig
2023-04-11 15:35       ` Darrick J. Wong [this message]
2023-04-12 12:09         ` Christoph Hellwig
2023-04-12 22:04           ` Darrick J. Wong
2023-04-06  0:10   ` [PATCH 5/6] mkfs.xfs.8: warn about the version=ci feature Darrick J. Wong
2023-04-11  4:59     ` Christoph Hellwig
2023-04-06  0:10   ` [PATCH 6/6] mkfs: deprecate the ascii-ci feature Darrick J. Wong
2023-04-11  4:59     ` Christoph Hellwig
2023-04-13 15:19   ` [RFC PATCH 7/6] xfs_db: hoist name obfuscation code out of metadump.c Darrick J. Wong
2023-04-13 15:20   ` [RFC PATCH 8/6] xfs_db: create dirents and xattrs with colliding names Darrick J. Wong
2023-04-06  0:11 ` [PATCH] fstests: add a couple more tests for ascii-ci problems Darrick J. Wong

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=20230411153546.GH360889@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    /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