Skip to content

Commit 025e138

Browse files
ebiggersMikulas Patocka
authored andcommitted
blk-crypto: export wrapped key functions
Export blk_crypto_derive_sw_secret(), blk_crypto_import_key(), blk_crypto_generate_key(), and blk_crypto_prepare_key() so that they can be used by device-mapper when passing through wrapped key support. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
1 parent b7c18b1 commit 025e138

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

block/blk-crypto-profile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ int blk_crypto_derive_sw_secret(struct block_device *bdev,
501501
blk_crypto_hw_exit(profile);
502502
return err;
503503
}
504+
EXPORT_SYMBOL_GPL(blk_crypto_derive_sw_secret);
504505

505506
int blk_crypto_import_key(struct blk_crypto_profile *profile,
506507
const u8 *raw_key, size_t raw_key_size,
@@ -520,6 +521,7 @@ int blk_crypto_import_key(struct blk_crypto_profile *profile,
520521
blk_crypto_hw_exit(profile);
521522
return ret;
522523
}
524+
EXPORT_SYMBOL_GPL(blk_crypto_import_key);
523525

524526
int blk_crypto_generate_key(struct blk_crypto_profile *profile,
525527
u8 lt_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE])
@@ -537,6 +539,7 @@ int blk_crypto_generate_key(struct blk_crypto_profile *profile,
537539
blk_crypto_hw_exit(profile);
538540
return ret;
539541
}
542+
EXPORT_SYMBOL_GPL(blk_crypto_generate_key);
540543

541544
int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
542545
const u8 *lt_key, size_t lt_key_size,
@@ -556,6 +559,7 @@ int blk_crypto_prepare_key(struct blk_crypto_profile *profile,
556559
blk_crypto_hw_exit(profile);
557560
return ret;
558561
}
562+
EXPORT_SYMBOL_GPL(blk_crypto_prepare_key);
559563

560564
/**
561565
* blk_crypto_intersect_capabilities() - restrict supported crypto capabilities

0 commit comments

Comments
 (0)