From: Linlin Zhang <linlin.zhang@oss.qualcomm.com>
To: Milan Broz <gmazyland@gmail.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Eric Biggers <ebiggers@kernel.org>
Cc: Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Benjamin Marzinski <bmarzins@redhat.com>,
Neeraj Soni <neeraj.soni@oss.qualcomm.com>,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] dm-inlinecrypt: add support for hardware-wrapped keys
Date: Fri, 22 May 2026 13:57:45 +0800 [thread overview]
Message-ID: <87dff78b-c075-48d7-83cb-810694617ba2@oss.qualcomm.com> (raw)
In-Reply-To: <98f9f0e3-964d-414c-a329-254c141c8d48@gmail.com>
On 5/18/2026 8:49 PM, Milan Broz wrote:
> On 5/18/26 10:11 AM, Linlin Zhang wrote:
>
> ...
>>> IOW the mapping will look like this (1 is number of optional parameters):
>>>
>>> <cipher> <key> <iv_offset> <device path> <offset> 1 hw-wrapped
>>> or
>>> <cipher> <key> <iv_offset> <device path> <offset> 1 keytype=hw-wrapped
>>
>>
>> Thanks for your suggestion!
>>
>> I agree that keeping "hw-wrapped" or "keytype=raw|hw-wrapped" as an optional
>> argument helps preserve compatibility when switching from "crypt" to
>> "inlinecrypt"
>
> Just use semicolon as separator as Mikulas suggested.
> (I mixed that up, we always use semicolan as separator.)
>
>> My concern is that, in practice, this optional argument may effectively become
>> mandatory for certain configurations. For instance, "hw-wrapped" or
>> "keytype=raw|hw-wrapped" must be set for a wrapped key. This slightly blurs the
>> original intent of "optional arguments", which are typically expected to be
>> truly optional for correct operation.
>
> It no longer works this way, it is normal that in some scenarios "optional" arguments
> are required. For example sector_size - once you use non-default, you have to specify
> it always.
>
> IOW no problem with that.
Thanks for the comments!
ACK. I'll send a new patch with such modification.
>
> Milan
>
prev parent reply other threads:[~2026-05-22 5:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-16 11:50 [PATCH v2 0/1] dm-inlinecrypt: add support for hardware-wrapped keys Linlin Zhang
2026-05-16 11:50 ` [PATCH v2 1/1] " Linlin Zhang
2026-05-16 12:17 ` Milan Broz
2026-05-18 8:11 ` Linlin Zhang
2026-05-18 12:37 ` Mikulas Patocka
2026-05-22 5:56 ` Linlin Zhang
2026-05-18 12:49 ` Milan Broz
2026-05-22 5:57 ` Linlin Zhang [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=87dff78b-c075-48d7-83cb-810694617ba2@oss.qualcomm.com \
--to=linlin.zhang@oss.qualcomm.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=ebiggers@kernel.org \
--cc=gmazyland@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=neeraj.soni@oss.qualcomm.com \
--cc=snitzer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox