On Sat, Nov 21, 2026 at 06:45:39PM +0530, Anvik Loitongbam wrote:
> inlinecrypt_status() emits ctx->key_type as a positional argument between
> the key and iv_offset:
> 
>   <cipher> <key> <key_type> <iv_offset> <dev_path> <start>
> 
> but inlinecrypt_ctr() parses the base table as:
> 
>   <cipher> <key> <iv_offset> <dev_path> <start>
> 
> and keytype, is an optional feature argument parsed by
> inlinecrypt_ctr_optional(). Resulting in STATUSTYPE_TABLE output for every
> dm-inlinecrypt device to be not reloadable, the constructor reads
> key_type as iv_offset and shifts the remaining fields.
> 
> Keep the base table in constructor order and emit a non-default key type
> as keytype:hw-wrapped in the optional feature list. Raw keys remain the
> default and are not emitted, preserving the existing table text for
> raw-key devices.
> 
> The two dmsetup examples in the documentation acquired
> the same extra positional key-type field, so removed it there as well.
> 
> Reported-by: Sashiko <[email protected]>
> Closes: 
> https://sashiko.dev/#/patchset/20260525121348.1321282-2-linlin.zhang%40oss.qualcomm.com
> Fixes: f9f57971da38 ("dm-inlinecrypt: add support for hardware-wrapped keys")
> Cc: [email protected]
> Signed-off-by: Anvik Loitongbam <[email protected]>

Reviewed-by: Eric Biggers <[email protected]>

- Eric

Reply via email to