Skip to content

Commit d511d0c

Browse files
ebiggerskawasaki
authored andcommitted
block: export blk-crypto symbols required by dm-inlinecrypt
bio_crypt_set_ctx(), blk_crypto_init_key(), and blk_crypto_start_using_key() are needed to use inline encryption; see Documentation/block/inline-encryption.rst. Export them so that dm-inlinecrypt can use them. The only reason these weren't exported before was that inline encryption was previously used only by fs/crypto/ which is built-in code. Signed-off-by: Eric Biggers <ebiggers@google.com>
1 parent 6b4d829 commit d511d0c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

block/blk-crypto.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ void bio_crypt_set_ctx(struct bio *bio, const struct blk_crypto_key *key,
116116

117117
bio->bi_crypt_context = bc;
118118
}
119+
EXPORT_SYMBOL_GPL(bio_crypt_set_ctx);
119120

120121
void __bio_crypt_free_ctx(struct bio *bio)
121122
{
@@ -349,6 +350,7 @@ int blk_crypto_init_key(struct blk_crypto_key *blk_key,
349350

350351
return 0;
351352
}
353+
EXPORT_SYMBOL_GPL(blk_crypto_init_key);
352354

353355
bool blk_crypto_config_supported_natively(struct block_device *bdev,
354356
const struct blk_crypto_config *cfg)
@@ -399,6 +401,7 @@ int blk_crypto_start_using_key(struct block_device *bdev,
399401
}
400402
return blk_crypto_fallback_start_using_mode(key->crypto_cfg.crypto_mode);
401403
}
404+
EXPORT_SYMBOL_GPL(blk_crypto_start_using_key);
402405

403406
/**
404407
* blk_crypto_evict_key() - Evict a blk_crypto_key from a block_device

0 commit comments

Comments
 (0)