]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm: pass through operations on wrapped inline crypto keys
authorEric Biggers <ebiggers@google.com>
Thu, 1 May 2025 21:23:20 +0000 (14:23 -0700)
committerMikulas Patocka <mpatocka@redhat.com>
Tue, 6 May 2025 17:08:20 +0000 (19:08 +0200)
commite93912786e50804e7c53456da75d586cace8732f
tree0b5fa68e467b47b4b57a823d480281f1b34004a4
parent025e138eeb752ae19e8eb0144d9f7cc87d579b45
dm: pass through operations on wrapped inline crypto keys

Make the device-mapper layer pass through the derive_sw_secret,
import_key, generate_key, and prepare_key blk-crypto operations when all
underlying devices support hardware-wrapped inline crypto keys and are
passing through inline crypto support.

Commit ebc4176551cd ("blk-crypto: add basic hardware-wrapped key
support") already made BLK_CRYPTO_KEY_TYPE_HW_WRAPPED be passed through
in the same way that the other crypto capabilities are.  But the wrapped
key support also includes additional operations in blk_crypto_ll_ops,
and the dm layer needs to implement those to pass them through.
derive_sw_secret is needed by fscrypt, while the other operations are
needed for the new blk-crypto ioctls to work on device-mapper devices
and not just the raw partitions.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-table.c