mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Eric Biggers <ebiggers@kernel.org>,
	Christoph Hellwig <hch@infradead.org>
Cc: dm-devel@lists.linux.dev, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Md Sadre Alam <quic_mdalam@quicinc.com>,
	Israel Rukshin <israelr@nvidia.com>
Subject: Re: [RFC PATCH] dm-inlinecrypt: add target for inline block device encryption
Date: Fri, 4 Oct 2024 21:21:47 +0200	[thread overview]
Message-ID: <f335366a-3752-4272-8592-fe1ed9f43aee@gmail.com> (raw)
In-Reply-To: <20241004184819.GA86456@google.com>

On 10/4/24 8:48 PM, Eric Biggers wrote:
> On Thu, Oct 03, 2024 at 10:44:07PM -0700, Christoph Hellwig wrote:
>> On Thu, Oct 03, 2024 at 05:41:52PM -0700, Eric Biggers wrote:
>>> From: Eric Biggers <ebiggers@google.com>
>>>
>>> Add a new device-mapper target "dm-inlinecrypt" that is similar to
>>> dm-crypt but uses the blk-crypto API instead of the regular crypto API.
>>> This allows it to take advantage of inline encryption hardware such as
>>> that commonly built into UFS host controllers.
>>>
>>> The table syntax matches dm-crypt's, but for now only a stripped-down
>>> set of parameters is supported.  For example, for now AES-256-XTS is the
>>> only supported cipher.
>>
>> Maybe I'm stepping into a mine-field here, but if this simply uses
>> blk-crypto to accellerate a subset of dm-crypt, why isn't dm-crypt
>> simply enhanced to use blk-crypto when available?
>> compatible,
>>
> 
> Milan Broz (cryptsetup maintainer) has said that he prefers a separate dm
> target.  See
> https://lore.kernel.org/dm-devel/9ef95bbc-4eee-4c00-f199-0daa3cdd03ed@gmail.com/
> 
> That was a couple years ago though, and this discussion seems to have gone
> around in a circle.  Maybe things have changed.

There was another discussion recently. I also discussed this with Mikulas
as DM maintainer, and we agreed this is the best way.

Extending dm-crypt is possible, but the dm-crypt threat model should not allow
pushing plaintext down the level.
(I am currently investigating several issues with Opal hw encryption that just
cannot happen with sw dm-crypt. We opened can of worms supporting it in LUKS. :)

Actually, I like the inline encryption logic (and the sw fallback), just I would
prefer we clearly separate the code here (and dm-crypt is already complicated enough).

> A dm-crypt extension sounds fine to me too, though keep in mind there will
> eventually be inline crypto exclusive features such as hardware-wrapped keys.

Milan


  reply	other threads:[~2024-10-04 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04  0:41 Eric Biggers
2024-10-04  5:44 ` Christoph Hellwig
2024-10-04 18:48   ` Eric Biggers
2024-10-04 19:21     ` Milan Broz [this message]
2024-10-07  5:45       ` Christoph Hellwig
2024-10-07  8:25         ` Milan Broz
2024-10-08  9:20           ` Christoph Hellwig
2024-10-04 20:17 ` Bart Van Assche

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=f335366a-3752-4272-8592-fe1ed9f43aee@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=ebiggers@kernel.org \
    --cc=hch@infradead.org \
    --cc=israelr@nvidia.com \
    --cc=linux-block@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

all inboxes | Powered by JetHome®