From 9f8ee7b47cc075010c5a6d8b404eede879664e76 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 22 Jan 2020 12:32:33 -0800 Subject: [PATCH] ANDROID: block: export symbols needed for modules to use inline crypto Export the blk-crypto symbols needed for modules to use inline crypto. These would have already been exported, except that so far they've only been used by fs/crypto/, which is no longer modular. Bug: 137270441 Bug: 147814592 Change-Id: I64bf98aecabe891c188b30dd50124aacb1e008ca Signed-off-by: Eric Biggers --- block/bio-crypt-ctx.c | 1 + block/blk-crypto-fallback.c | 1 + block/blk-crypto.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/block/bio-crypt-ctx.c b/block/bio-crypt-ctx.c index d02d2bff991a..b6df3dcf28cc 100644 --- a/block/bio-crypt-ctx.c +++ b/block/bio-crypt-ctx.c @@ -49,6 +49,7 @@ struct bio_crypt_ctx *bio_crypt_alloc_ctx(gfp_t gfp_mask) { return mempool_alloc(bio_crypt_ctx_pool, gfp_mask); } +EXPORT_SYMBOL_GPL(bio_crypt_alloc_ctx); void bio_crypt_free_ctx(struct bio *bio) { diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index c7523af2e4b3..5cbf18a1995f 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -557,6 +557,7 @@ out: mutex_unlock(&tfms_init_lock); return err; } +EXPORT_SYMBOL_GPL(blk_crypto_start_using_mode); int blk_crypto_fallback_evict_key(const struct blk_crypto_key *key) { diff --git a/block/blk-crypto.c b/block/blk-crypto.c index 3e1bb4192498..a8de0d9680e0 100644 --- a/block/blk-crypto.c +++ b/block/blk-crypto.c @@ -221,6 +221,7 @@ int blk_crypto_init_key(struct blk_crypto_key *blk_key, return 0; } +EXPORT_SYMBOL_GPL(blk_crypto_init_key); /** * blk_crypto_evict_key() - Evict a key from any inline encryption hardware @@ -247,3 +248,4 @@ int blk_crypto_evict_key(struct request_queue *q, return blk_crypto_fallback_evict_key(key); } +EXPORT_SYMBOL_GPL(blk_crypto_evict_key);