Re: [PATCH v2 1/1] dm-inlinecrypt: add support for hardware-wrapped keys

Linlin Zhang <[email protected]>
Newsgroups dev.linux.lists.dm-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.