All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>,
	Eric Biggers <ebiggers@kernel.org>,
	Leah Rumancik <leah.rumancik@gmail.com>,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ext4: wipe filename upon file deletion
Date: Thu, 8 Apr 2021 22:51:09 -0400	[thread overview]
Message-ID: <YG/BHfB3arzT4x6W@mit.edu> (raw)
In-Reply-To: <20210409000207.GJ22091@magnolia>

On Thu, Apr 08, 2021 at 05:02:07PM -0700, Darrick J. Wong wrote:
> > In the ideal world, sure, all or most of them would agree that they
> > *shouldn't* be storing any kind of PII at rest unencrypted, but they
> > can't be sure, and so from the perspective of keeping their audit and
> > I/T compliance committees happy, this requirement is desirable from a
> > "belt and suspenders" perspective.
> > 
> > > This seems like a better fit for FITRIM than anything else.
> > > 
> > > Ooohh. We sure do suck at APIs, don't we? FITRIM has no flags field,
> > > so we can't extend that.
> > 
> > I don't have any serious objections to defining FITRIM2; OTOH, for
> 
> Er, are we talking about the directory name wiping, or the journal
> discarding?

Sorry, I was talking about journal wiping.  The conflation is because
the reason why we want to wipe the journal is because of the directory
names in the journal, so the two are very much connected for our use
case, but yes, directory names in directories is very from directory
names in the journal.

We don't actually need any kind of interface for wiping names in
directories, since it doesn't cost us anything to unconditionally wipe
the directory entries as opposed to just setting the inode number to
zero.

> I didn't think it was any more difficult than changing xfs_removename to
> zero out the name and ftype fields at the same time it adds the whiteout
> to the dirent.  But TBH I haven't thought through this too deeply.
> 
> I /do/ think that if you ever want to add "secure" deletion to XFS, I'd
> want to do it by implementing FS_SECRM_FL for XFS, and not by adding
> more mount options.

The original meaning of FS_SECRM_FL was that the data blocks would be
zero'ed --- when the inode was deleted.  We don't intend to have a
mount option for ext4 for zero'ing the directory entry, since it
really doesn't cost us anything to memset the directory entry to zero
at unlink time.  I guess for a DAX file system, zero'ing the directory
entry might cost a an extra cache line write, but for block-oriented
devices, for us it's essentially cost-free --- so why add an extra
mount option, and instead just zero the directory entry of everything
other than rec_len?

> Question -- does e2image have the ability to obscure names like
> xfs_metadump will do if you don't pass it "-o" ?

Yes, e2image has had the -s option to scramble file names since
E2fsprogs 1.36 (February, 2005).

						- Ted

  reply	other threads:[~2021-04-09  2:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 15:42 [PATCH v2 0/2] Filename wipeout patch series updates Leah Rumancik
2021-04-07 15:42 ` [PATCH v2 1/2] ext4: wipe filename upon file deletion Leah Rumancik
2021-04-07 21:33   ` Eric Biggers
2021-04-08  3:48     ` Theodore Ts'o
2021-04-08  5:21       ` Dave Chinner
2021-04-08 19:25         ` Theodore Ts'o
2021-04-09  0:02           ` Darrick J. Wong
2021-04-09  2:51             ` Theodore Ts'o [this message]
2021-04-11 23:38               ` Dave Chinner
2021-04-07 15:42 ` [PATCH v2 2/2] ext4: add ioctl FS_IOC_CHKPT_JRNL Leah Rumancik
2021-04-07 18:35   ` Darrick J. Wong
2021-04-07 21:15     ` Dave Chinner
2021-04-08  1:26       ` Darrick J. Wong
2021-04-08  4:43         ` Dave Chinner
2021-04-08 23:49           ` Darrick J. Wong
2021-04-11 23:13             ` Dave Chinner

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=YG/BHfB3arzT4x6W@mit.edu \
    --to=tytso@mit.edu \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=leah.rumancik@gmail.com \
    --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.