mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Md Sadre Alam <quic_mdalam@quicinc.com>
To: Adrian Vovk <adrianvovk@gmail.com>,
	Eric Biggers <ebiggers@kernel.org>, <dm-devel@lists.linux.dev>
Cc: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Israel Rukshin <israelr@nvidia.com>,
	Milan Broz <gmazyland@gmail.com>,
	Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: [RFC PATCH v2 2/2] dm-inlinecrypt: add target for inline block device encryption
Date: Fri, 11 Jul 2025 11:00:40 +0530	[thread overview]
Message-ID: <ecbb7ea8-11f6-30c1-ad77-bd984c52ca33@quicinc.com> (raw)
In-Reply-To: <681a6d2e-a80a-4e81-a049-841d7e8582ba@gmail.com>

Hi Eric,

On 10/18/2024 8:22 AM, Adrian Vovk wrote:
> Hello,
> 
> On 10/16/24 19:27, 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.
> 
> Wow! Thank you for this patch! This is something we really want in 
> systemd and in GNOME, and I came across this patchset on accident while 
> trying to find a way to get someone to work on it for us.
> 
>> 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.
>>
>> dm-inlinecrypt is based on Android's dm-default-key with the
>> controversial passthrough support removed.
> 
> That's quite unfortunate. I'd say this passthrough support is probably 
> the most powerful thing about dm-default-key.
> 
> Could you elaborate on why you removed it? I think it's a necessary 
> feature. Enabling multiple layers of encryption stacked on top of each 
> other, without paying the cost of double (or more...) encryption, is 
> something we really want over in userspace. It'll enable us to stack 
> full-disk encryption with encrypted /home directories for each user and 
> then stack encrypted per-app data dirs on top of that. I'd say that the 
> passthrough support is more important for us than the performance 
> benefit of using inline encryption hardware.
> 
> Without a solution to layer encryption we can't do a lot of good things 
> we want to do in userspace.
> 
> As far as I understand, the passthrough support was controversial only 
> because previous upstreaming attempts tried to punch holes into dm-crypt 
> to make this work. I don't know of an attempt to upstream dm-default-key 
> as-is, with passthrough support. As far as I can tell, people even 
> seemed open to that idea...
> 
> Is there some context I'm missing? Information would be appreciated.
> 
>> Note that due to the removal
>> of passthrough support, use of dm-inlinecrypt in combination with
>> fscrypt causes double encryption of file contents (similar to dm-crypt +
>> fscrypt), with the fscrypt layer not being able to use the inline
>> encryption hardware.  This makes dm-inlinecrypt unusable on systems such
>> as Android that use fscrypt and where a more optimized approach is
>> needed.
> 
> Yeah, sadly you've removed the use-case we're very interested in. 
> Generic PC hardware doesn't have blk-crypto hardware as far as I can 
> tell, so we don't get the performance benefit of replacing dm-crypt with 
> dm-inlinecrypt. However, we do get the performance benefit of the 
> passthrough support (if we run this on top of the blk-crypto software 
> emulation mode, for instance)
> 
> 
> Best,
> 
> Adrian Vovk
> 
>> It is however suitable as a replacement for dm-crypt.
>>
>> Signed-off-by: Eric Biggers <ebiggers@google.com>
>>

Is there any plan to update this series ? IPQ9574 needs this 
dm-inlinecrypt driver for secure eMMC feature.

Thanks,
Alam.

      parent reply	other threads:[~2025-07-11  5:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 23:27 [RFC PATCH v2 0/2] " Eric Biggers
2024-10-16 23:27 ` [RFC PATCH v2 1/2] block: export blk-crypto symbols required by dm-inlinecrypt Eric Biggers
2024-10-16 23:27 ` [RFC PATCH v2 2/2] dm-inlinecrypt: add target for inline block device encryption Eric Biggers
2024-10-17 19:44   ` Eric Biggers
2024-10-17 20:17     ` Milan Broz
2024-10-17 20:28       ` Eric Biggers
2024-10-17 21:03         ` Milan Broz
2024-10-18  2:52   ` Adrian Vovk
2024-10-18 17:33     ` Eric Biggers
2025-07-11  5:30     ` Md Sadre Alam [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=ecbb7ea8-11f6-30c1-ad77-bd984c52ca33@quicinc.com \
    --to=quic_mdalam@quicinc.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-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.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®