All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Dave Chinner <david@fromorbit.com>,
	linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org,
	Satya Tangirala <satyat@google.com>,
	Paul Crowley <paulcrowley@google.com>,
	Paul Lawrence <paullawrence@google.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [PATCH 1/3] fscrypt: add support for inline-encryption-optimized policies
Date: Tue, 22 Oct 2019 09:30:01 -0400	[thread overview]
Message-ID: <20191022133001.GA23268@mit.edu> (raw)
In-Reply-To: <20191022060004.GA333751@sol.localdomain>

On Mon, Oct 21, 2019 at 11:00:04PM -0700, Eric Biggers wrote:
> That won't work because we need consecutive file blocks to have consecutive IVs
> as often as possible.  The crypto support in the UFS and EMMC standards takes
> only a single 64-bit "data unit number" (DUN) per request, which the hardware
> uses as the first 64 bits of the IV and automatically increments for each data
> unit (i.e. for each filesystem block, in this case).

It seems very likely that for systems that are using UFS and eMMC
(which are overwhelming lower-end devices --- e.g., embedded and
mobile handsets) 32-bit inode and logical block numbers will be just
fine.

If and when we actually get inline crypto support for server-class
systems, hopefully they will support 128-bit DUN's, and/or they will
have sufficiently fast key load times such that we can use per-file
keying.

> An alternative which would work nicely on ext4 and xfs (if xfs supported
> fscrypt) would be to pass the physical block number as the DUN.  However, that
> wouldn't work at all on f2fs because f2fs moves data blocks around.  And since
> most people who want to use this are using f2fs, f2fs support is essential.

And that is something fscrypt supports already, so if people really
did want to use 64-bit logical block numbers, they could do that, at
the cost of giving up the ability to shrink the file system (which XFS
doesn't support anyway....)

							- Ted

WARNING: multiple messages have this Message-ID (diff)
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Dave Chinner <david@fromorbit.com>,
	linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org,
	Satya Tangirala <satyat@google.com>,
	Paul Crowley <paulcrowley@google.com>,
	Paul Lawrence <paullawrence@google.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [f2fs-dev] [PATCH 1/3] fscrypt: add support for inline-encryption-optimized policies
Date: Tue, 22 Oct 2019 09:30:01 -0400	[thread overview]
Message-ID: <20191022133001.GA23268@mit.edu> (raw)
In-Reply-To: <20191022060004.GA333751@sol.localdomain>

On Mon, Oct 21, 2019 at 11:00:04PM -0700, Eric Biggers wrote:
> That won't work because we need consecutive file blocks to have consecutive IVs
> as often as possible.  The crypto support in the UFS and EMMC standards takes
> only a single 64-bit "data unit number" (DUN) per request, which the hardware
> uses as the first 64 bits of the IV and automatically increments for each data
> unit (i.e. for each filesystem block, in this case).

It seems very likely that for systems that are using UFS and eMMC
(which are overwhelming lower-end devices --- e.g., embedded and
mobile handsets) 32-bit inode and logical block numbers will be just
fine.

If and when we actually get inline crypto support for server-class
systems, hopefully they will support 128-bit DUN's, and/or they will
have sufficiently fast key load times such that we can use per-file
keying.

> An alternative which would work nicely on ext4 and xfs (if xfs supported
> fscrypt) would be to pass the physical block number as the DUN.  However, that
> wouldn't work at all on f2fs because f2fs moves data blocks around.  And since
> most people who want to use this are using f2fs, f2fs support is essential.

And that is something fscrypt supports already, so if people really
did want to use 64-bit logical block numbers, they could do that, at
the cost of giving up the ability to shrink the file system (which XFS
doesn't support anyway....)

							- Ted


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2019-10-22 13:30 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 23:03 [PATCH 0/3] fscrypt: support for inline-encryption-optimized policies Eric Biggers
2019-10-21 23:03 ` [f2fs-dev] " Eric Biggers
2019-10-21 23:03 ` [PATCH 1/3] fscrypt: add " Eric Biggers
2019-10-21 23:03   ` [f2fs-dev] " Eric Biggers
2019-10-22  5:27   ` Dave Chinner
2019-10-22  5:27     ` [f2fs-dev] " Dave Chinner
2019-10-22  6:00     ` Eric Biggers
2019-10-22  6:00       ` [f2fs-dev] " Eric Biggers
2019-10-22 13:30       ` Theodore Y. Ts'o [this message]
2019-10-22 13:30         ` Theodore Y. Ts'o
2019-10-22 16:15         ` Eric Biggers
2019-10-22 16:15           ` [f2fs-dev] " Eric Biggers
2019-10-23  9:27         ` Christoph Hellwig
2019-10-23  9:27           ` [f2fs-dev] " Christoph Hellwig
2019-10-23 12:57           ` Theodore Y. Ts'o
2019-10-23 12:57             ` [f2fs-dev] " Theodore Y. Ts'o
2019-10-24  1:27             ` Christoph Hellwig
2019-10-24  1:27               ` [f2fs-dev] " Christoph Hellwig
2019-10-24  2:44               ` Eric Biggers
2019-10-24  2:44                 ` [f2fs-dev] " Eric Biggers
2019-10-24  7:04                 ` Christoph Hellwig
2019-10-24  7:04                   ` [f2fs-dev] " Christoph Hellwig
2019-10-24  9:54                   ` Paul Crowley
2019-10-24  9:54                     ` [f2fs-dev] " Paul Crowley via Linux-f2fs-devel
2019-10-23  9:28       ` Christoph Hellwig
2019-10-23  9:28         ` [f2fs-dev] " Christoph Hellwig
2019-10-21 23:03 ` [PATCH 2/3] ext4: add support for INLINE_CRYPT_OPTIMIZED encryption policies Eric Biggers
2019-10-21 23:03   ` [f2fs-dev] " Eric Biggers
2019-10-22 13:37   ` Theodore Y. Ts'o
2019-10-22 13:37     ` [f2fs-dev] " Theodore Y. Ts'o
2019-10-22 16:37     ` Eric Biggers
2019-10-22 16:37       ` [f2fs-dev] " Eric Biggers
2019-10-21 23:03 ` [PATCH 3/3] f2fs: " Eric Biggers
2019-10-21 23:03   ` [f2fs-dev] " Eric Biggers
2019-10-22 16:43   ` Jaegeuk Kim
2019-10-22 16:43     ` [f2fs-dev] " Jaegeuk Kim

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=20191022133001.GA23268@mit.edu \
    --to=tytso@mit.edu \
    --cc=david@fromorbit.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=paulcrowley@google.com \
    --cc=paullawrence@google.com \
    --cc=satyat@google.com \
    /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.