All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] debugfs: avoid ambiguity when printing filenames
Date: Sun, 28 Apr 2019 20:11:14 -0400	[thread overview]
Message-ID: <20190429001114.GA555@mit.edu> (raw)
In-Reply-To: <20190422202715.167750-1-ebiggers@kernel.org>

On Mon, Apr 22, 2019 at 01:27:15PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> The way debugfs escapes filenames is ambiguous because a sequence like
> M-A can mean either the byte 'A' + 128 == 0xc1 or the three bytes
> {'M', '-', 'A'}.  Similarly, ^A can mean either the byte
> 'A' ^ 0x40 == 0x01 or the two bytes {'^', 'A'}.
> 
> Fix this and simplify the code by switching to a simpler strategy where
> all bytes < 32, all bytes >= 127, and backslash are encoded with C-style
> hex escape sequences.  E.g., the byte 0xc1 will now be encoded as \xc1
> rather than M-A as it was before, while a filename consisting of the
> three bytes {'M', '-', 'A'} will continue to be shown as M-A.
> 
> I want to fix this mainly because I want to use debugfs to retrieve raw
> encrypted filenames for ciphertext verification tests.  But this doesn't
> work if the returned filenames are ambiguous.
> 
> Fixes: 68a1de3df340 ("debugfs: pretty print encrypted filenames in the ls command")
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Thanks, applied.

						- Ted

      reply	other threads:[~2019-04-29  0:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 20:27 [PATCH] debugfs: avoid ambiguity when printing filenames Eric Biggers
2019-04-29  0:11 ` Theodore Ts'o [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=20190429001114.GA555@mit.edu \
    --to=tytso@mit.edu \
    --cc=ebiggers@kernel.org \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.