linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: dm-devel@lists.linux.dev, Israel Rukshin <israelr@nvidia.com>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-block@vger.kernel.org, linux-fscrypt@vger.kernel.org,
	Adrian Vovk <adrianvovk@gmail.com>,
	Md Sadre Alam <quic_mdalam@quicinc.com>,
	linux-ext4@vger.kernel.org, Milan Broz <gmazyland@gmail.com>
Subject: Re: [f2fs-dev] [RFC PATCH 0/4] dm-default-key: target for filesystem metadata encryption
Date: Mon, 21 Oct 2024 13:52:58 +0200 (CEST)	[thread overview]
Message-ID: <b56689c6-c0cd-c44e-16fb-8a73c460aa87@redhat.com> (raw)
In-Reply-To: <20241018184339.66601-1-ebiggers@kernel.org>



On Fri, 18 Oct 2024, Eric Biggers wrote:

> This series adds "metadata encryption" support to ext4 and f2fs via a
> new device-mapper target dm-default-key.  dm-default-key encrypts all
> data on a block device that isn't already encrypted by the filesystem.
> 
> Except for the passthrough support, dm-default-key is basically the same
> as the proposed dm-inlinecrypt which omits that feature
> (https://lore.kernel.org/dm-devel/20241016232748.134211-1-ebiggers@kernel.org/).
> 
> I am sending this out for reference, as dm-default-key (which Android
> has been using for a while) hasn't previously been sent to the lists in
> full, and there has been interest in it.  However, my current impression
> is that this feature will need to be redesigned as a filesystem native
> feature in order to make it upstream.  If that is indeed the case, then
> IMO it would make sense to merge dm-inlinecrypt in the mean time instead
> (or add its functionality to dm-crypt) so that anyone who just wants
> "dm-crypt + inline encryption hardware" gets a solution for that.

I we merge dm-inlinecrypt, we can't remove it later because users will 
depend on it. I think it is not sensible to have two targets 
(dm-inlinecrypt and dm-default-key) that do almost the same thing.

I've got another idea - what about a new target "dm-metadata-switch" that 
will take two block devices as arguments and it will pass metadata bios to 
the first device and data bios to the second device - so that the logic 
to decide where the bio will go would be decoupled from the encryption. 
Then, you can put dm-crypt or dm-inlinecrypt underneath 
"dm-metadata-switch".

----------------------
|     filesystem     |
----------------------
          |
          V
----------------------
| dm-metadata-switch |
----------------------
      |           |
      V           |
------------      |
| dm-crypt |      |
------------      |
      |           |
      V           V
-------------------------
| physical block device |
-------------------------

Mikulas



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

  parent reply	other threads:[~2024-10-21 11:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 18:43 [f2fs-dev] [RFC PATCH 0/4] dm-default-key: target for filesystem metadata encryption Eric Biggers via Linux-f2fs-devel
2024-10-18 18:43 ` [f2fs-dev] [RFC PATCH 1/4] block: export blk-crypto symbols required by dm-default-key Eric Biggers via Linux-f2fs-devel
2024-10-18 18:43 ` [f2fs-dev] [RFC PATCH 2/4] block: add the bi_skip_dm_default_key flag Eric Biggers via Linux-f2fs-devel
2024-10-21 11:11   ` Mikulas Patocka
2024-10-21 19:02     ` Eric Biggers via Linux-f2fs-devel
2024-10-18 18:43 ` [f2fs-dev] [RFC PATCH 3/4] dm-default-key: add target for filesystem metadata encryption Eric Biggers via Linux-f2fs-devel
2024-10-18 18:43 ` [f2fs-dev] [RFC PATCH 4/4] ext4, f2fs: support metadata encryption via dm-default-key Eric Biggers via Linux-f2fs-devel
2024-10-21 11:52 ` Mikulas Patocka [this message]
2024-10-21 19:10   ` [f2fs-dev] [RFC PATCH 0/4] dm-default-key: target for filesystem metadata encryption Eric Biggers via Linux-f2fs-devel

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=b56689c6-c0cd-c44e-16fb-8a73c460aa87@redhat.com \
    --to=mpatocka@redhat.com \
    --cc=adrianvovk@gmail.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=ebiggers@kernel.org \
    --cc=gmazyland@gmail.com \
    --cc=israelr@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_mdalam@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).