mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
ce8a79d560
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmOScsgQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpi5ID/9pLXFYOq1+uDjU0KO/MdjMjK8Ukr34lCnk WkajRLheE8JBKOFDE54XJk56sQSZHX9bTWqziar0h1fioh7FlQR/tVvzsERCm2M9 2y9THJNJygC68wgybStyiKlshFjl7TD7Kv5N9Y3xP3mkQygT+D6o8fXZk5xQbYyH YdFSoq4rJVHxRL03yzQiReGGIYdOUEQQh8l1FiLwLlKa3lXAey1KuxWIzksVN0KK aZB4QhiBpOiPgDHUVisq2XtyQjpZ2byoCImPzgrcqk9Jo4esvm/e6esrg4xlsvII LKFFkTmbVqjUZtFjqakFHmfuzVor4nU5f+xb90ZHExuuODYckkxWp5rWhf9QwqqI 0ik6WYgI1/5vnHnX8f2DYzOFQf9qa/rLgg0CshyUODlD6RfHa9vntqYvlIFkmOBd Q7KblIoK8YTzUS1M+v7X8JQ7gDR2KwygH37Da2KJS+vgvfIb8kJGr1ZORuhJuJJ7 Bl69gaNkHTHrqufp7UI64YXfueeuNu2J9z3zwzGoxeaFaofF/phDn0/2gCQE1fQI XBhsMw+ETqI6B2SPHMnzYDu2DM1S8ZTOYQlaD4G3uqgWnAM1tG707395uAy5yu4n D5azU1fVG4UocoNIyPujpaoSRs2zWZycEFEeUQkhyDDww/j4hlHi6H33eOnk0zsr wxzFGfvHfw== =k/vv -----END PGP SIGNATURE----- Merge tag 'for-6.2/block-2022-12-08' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - NVMe pull requests via Christoph: - Support some passthrough commands without CAP_SYS_ADMIN (Kanchan Joshi) - Refactor PCIe probing and reset (Christoph Hellwig) - Various fabrics authentication fixes and improvements (Sagi Grimberg) - Avoid fallback to sequential scan due to transient issues (Uday Shankar) - Implement support for the DEAC bit in Write Zeroes (Christoph Hellwig) - Allow overriding the IEEE OUI and firmware revision in configfs for nvmet (Aleksandr Miloserdov) - Force reconnect when number of queue changes in nvmet (Daniel Wagner) - Minor fixes and improvements (Uros Bizjak, Joel Granados, Sagi Grimberg, Christoph Hellwig, Christophe JAILLET) - Fix and cleanup nvme-fc req allocation (Chaitanya Kulkarni) - Use the common tagset helpers in nvme-pci driver (Christoph Hellwig) - Cleanup the nvme-pci removal path (Christoph Hellwig) - Use kstrtobool() instead of strtobool (Christophe JAILLET) - Allow unprivileged passthrough of Identify Controller (Joel Granados) - Support io stats on the mpath device (Sagi Grimberg) - Minor nvmet cleanup (Sagi Grimberg) - MD pull requests via Song: - Code cleanups (Christoph) - Various fixes - Floppy pull request from Denis: - Fix a memory leak in the init error path (Yuan) - Series fixing some batch wakeup issues with sbitmap (Gabriel) - Removal of the pktcdvd driver that was deprecated more than 5 years ago, and subsequent removal of the devnode callback in struct block_device_operations as no users are now left (Greg) - Fix for partition read on an exclusively opened bdev (Jan) - Series of elevator API cleanups (Jinlong, Christoph) - Series of fixes and cleanups for blk-iocost (Kemeng) - Series of fixes and cleanups for blk-throttle (Kemeng) - Series adding concurrent support for sync queues in BFQ (Yu) - Series bringing drbd a bit closer to the out-of-tree maintained version (Christian, Joel, Lars, Philipp) - Misc drbd fixes (Wang) - blk-wbt fixes and tweaks for enable/disable (Yu) - Fixes for mq-deadline for zoned devices (Damien) - Add support for read-only and offline zones for null_blk (Shin'ichiro) - Series fixing the delayed holder tracking, as used by DM (Yu, Christoph) - Series enabling bio alloc caching for IRQ based IO (Pavel) - Series enabling userspace peer-to-peer DMA (Logan) - BFQ waker fixes (Khazhismel) - Series fixing elevator refcount issues (Christoph, Jinlong) - Series cleaning up references around queue destruction (Christoph) - Series doing quiesce by tagset, enabling cleanups in drivers (Christoph, Chao) - Series untangling the queue kobject and queue references (Christoph) - Misc fixes and cleanups (Bart, David, Dawei, Jinlong, Kemeng, Ye, Yang, Waiman, Shin'ichiro, Randy, Pankaj, Christoph) * tag 'for-6.2/block-2022-12-08' of git://git.kernel.dk/linux: (247 commits) blktrace: Fix output non-blktrace event when blk_classic option enabled block: sed-opal: Don't include <linux/kernel.h> sed-opal: allow using IOC_OPAL_SAVE for locking too blk-cgroup: Fix typo in comment block: remove bio_set_op_attrs nvmet: don't open-code NVME_NS_ATTR_RO enumeration nvme-pci: use the tagset alloc/free helpers nvme: add the Apple shared tag workaround to nvme_alloc_io_tag_set nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers nvme: consolidate setting the tagset flags nvme: pass nr_maps explicitly to nvme_alloc_io_tag_set block: bio_copy_data_iter nvme-pci: split out a nvme_pci_ctrl_is_dead helper nvme-pci: return early on ctrl state mismatch in nvme_reset_work nvme-pci: rename nvme_disable_io_queues nvme-pci: cleanup nvme_suspend_queue nvme-pci: remove nvme_pci_disable nvme-pci: remove nvme_disable_admin_queue nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl nvme: use nvme_wait_ready in nvme_shutdown_ctrl ...
429 lines
12 KiB
C
429 lines
12 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright 2019 Google LLC
|
|
*/
|
|
|
|
/*
|
|
* Refer to Documentation/block/inline-encryption.rst for detailed explanation.
|
|
*/
|
|
|
|
#define pr_fmt(fmt) "blk-crypto: " fmt
|
|
|
|
#include <linux/bio.h>
|
|
#include <linux/blkdev.h>
|
|
#include <linux/blk-crypto-profile.h>
|
|
#include <linux/module.h>
|
|
#include <linux/slab.h>
|
|
|
|
#include "blk-crypto-internal.h"
|
|
|
|
const struct blk_crypto_mode blk_crypto_modes[] = {
|
|
[BLK_ENCRYPTION_MODE_AES_256_XTS] = {
|
|
.name = "AES-256-XTS",
|
|
.cipher_str = "xts(aes)",
|
|
.keysize = 64,
|
|
.ivsize = 16,
|
|
},
|
|
[BLK_ENCRYPTION_MODE_AES_128_CBC_ESSIV] = {
|
|
.name = "AES-128-CBC-ESSIV",
|
|
.cipher_str = "essiv(cbc(aes),sha256)",
|
|
.keysize = 16,
|
|
.ivsize = 16,
|
|
},
|
|
[BLK_ENCRYPTION_MODE_ADIANTUM] = {
|
|
.name = "Adiantum",
|
|
.cipher_str = "adiantum(xchacha12,aes)",
|
|
.keysize = 32,
|
|
.ivsize = 32,
|
|
},
|
|
[BLK_ENCRYPTION_MODE_SM4_XTS] = {
|
|
.name = "SM4-XTS",
|
|
.cipher_str = "xts(sm4)",
|
|
.keysize = 32,
|
|
.ivsize = 16,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* This number needs to be at least (the number of threads doing IO
|
|
* concurrently) * (maximum recursive depth of a bio), so that we don't
|
|
* deadlock on crypt_ctx allocations. The default is chosen to be the same
|
|
* as the default number of post read contexts in both EXT4 and F2FS.
|
|
*/
|
|
static int num_prealloc_crypt_ctxs = 128;
|
|
|
|
module_param(num_prealloc_crypt_ctxs, int, 0444);
|
|
MODULE_PARM_DESC(num_prealloc_crypt_ctxs,
|
|
"Number of bio crypto contexts to preallocate");
|
|
|
|
static struct kmem_cache *bio_crypt_ctx_cache;
|
|
static mempool_t *bio_crypt_ctx_pool;
|
|
|
|
static int __init bio_crypt_ctx_init(void)
|
|
{
|
|
size_t i;
|
|
|
|
bio_crypt_ctx_cache = KMEM_CACHE(bio_crypt_ctx, 0);
|
|
if (!bio_crypt_ctx_cache)
|
|
goto out_no_mem;
|
|
|
|
bio_crypt_ctx_pool = mempool_create_slab_pool(num_prealloc_crypt_ctxs,
|
|
bio_crypt_ctx_cache);
|
|
if (!bio_crypt_ctx_pool)
|
|
goto out_no_mem;
|
|
|
|
/* This is assumed in various places. */
|
|
BUILD_BUG_ON(BLK_ENCRYPTION_MODE_INVALID != 0);
|
|
|
|
/* Sanity check that no algorithm exceeds the defined limits. */
|
|
for (i = 0; i < BLK_ENCRYPTION_MODE_MAX; i++) {
|
|
BUG_ON(blk_crypto_modes[i].keysize > BLK_CRYPTO_MAX_KEY_SIZE);
|
|
BUG_ON(blk_crypto_modes[i].ivsize > BLK_CRYPTO_MAX_IV_SIZE);
|
|
}
|
|
|
|
return 0;
|
|
out_no_mem:
|
|
panic("Failed to allocate mem for bio crypt ctxs\n");
|
|
}
|
|
subsys_initcall(bio_crypt_ctx_init);
|
|
|
|
void bio_crypt_set_ctx(struct bio *bio, const struct blk_crypto_key *key,
|
|
const u64 dun[BLK_CRYPTO_DUN_ARRAY_SIZE], gfp_t gfp_mask)
|
|
{
|
|
struct bio_crypt_ctx *bc;
|
|
|
|
/*
|
|
* The caller must use a gfp_mask that contains __GFP_DIRECT_RECLAIM so
|
|
* that the mempool_alloc() can't fail.
|
|
*/
|
|
WARN_ON_ONCE(!(gfp_mask & __GFP_DIRECT_RECLAIM));
|
|
|
|
bc = mempool_alloc(bio_crypt_ctx_pool, gfp_mask);
|
|
|
|
bc->bc_key = key;
|
|
memcpy(bc->bc_dun, dun, sizeof(bc->bc_dun));
|
|
|
|
bio->bi_crypt_context = bc;
|
|
}
|
|
|
|
void __bio_crypt_free_ctx(struct bio *bio)
|
|
{
|
|
mempool_free(bio->bi_crypt_context, bio_crypt_ctx_pool);
|
|
bio->bi_crypt_context = NULL;
|
|
}
|
|
|
|
int __bio_crypt_clone(struct bio *dst, struct bio *src, gfp_t gfp_mask)
|
|
{
|
|
dst->bi_crypt_context = mempool_alloc(bio_crypt_ctx_pool, gfp_mask);
|
|
if (!dst->bi_crypt_context)
|
|
return -ENOMEM;
|
|
*dst->bi_crypt_context = *src->bi_crypt_context;
|
|
return 0;
|
|
}
|
|
|
|
/* Increments @dun by @inc, treating @dun as a multi-limb integer. */
|
|
void bio_crypt_dun_increment(u64 dun[BLK_CRYPTO_DUN_ARRAY_SIZE],
|
|
unsigned int inc)
|
|
{
|
|
int i;
|
|
|
|
for (i = 0; inc && i < BLK_CRYPTO_DUN_ARRAY_SIZE; i++) {
|
|
dun[i] += inc;
|
|
/*
|
|
* If the addition in this limb overflowed, then we need to
|
|
* carry 1 into the next limb. Else the carry is 0.
|
|
*/
|
|
if (dun[i] < inc)
|
|
inc = 1;
|
|
else
|
|
inc = 0;
|
|
}
|
|
}
|
|
|
|
void __bio_crypt_advance(struct bio *bio, unsigned int bytes)
|
|
{
|
|
struct bio_crypt_ctx *bc = bio->bi_crypt_context;
|
|
|
|
bio_crypt_dun_increment(bc->bc_dun,
|
|
bytes >> bc->bc_key->data_unit_size_bits);
|
|
}
|
|
|
|
/*
|
|
* Returns true if @bc->bc_dun plus @bytes converted to data units is equal to
|
|
* @next_dun, treating the DUNs as multi-limb integers.
|
|
*/
|
|
bool bio_crypt_dun_is_contiguous(const struct bio_crypt_ctx *bc,
|
|
unsigned int bytes,
|
|
const u64 next_dun[BLK_CRYPTO_DUN_ARRAY_SIZE])
|
|
{
|
|
int i;
|
|
unsigned int carry = bytes >> bc->bc_key->data_unit_size_bits;
|
|
|
|
for (i = 0; i < BLK_CRYPTO_DUN_ARRAY_SIZE; i++) {
|
|
if (bc->bc_dun[i] + carry != next_dun[i])
|
|
return false;
|
|
/*
|
|
* If the addition in this limb overflowed, then we need to
|
|
* carry 1 into the next limb. Else the carry is 0.
|
|
*/
|
|
if ((bc->bc_dun[i] + carry) < carry)
|
|
carry = 1;
|
|
else
|
|
carry = 0;
|
|
}
|
|
|
|
/* If the DUN wrapped through 0, don't treat it as contiguous. */
|
|
return carry == 0;
|
|
}
|
|
|
|
/*
|
|
* Checks that two bio crypt contexts are compatible - i.e. that
|
|
* they are mergeable except for data_unit_num continuity.
|
|
*/
|
|
static bool bio_crypt_ctx_compatible(struct bio_crypt_ctx *bc1,
|
|
struct bio_crypt_ctx *bc2)
|
|
{
|
|
if (!bc1)
|
|
return !bc2;
|
|
|
|
return bc2 && bc1->bc_key == bc2->bc_key;
|
|
}
|
|
|
|
bool bio_crypt_rq_ctx_compatible(struct request *rq, struct bio *bio)
|
|
{
|
|
return bio_crypt_ctx_compatible(rq->crypt_ctx, bio->bi_crypt_context);
|
|
}
|
|
|
|
/*
|
|
* Checks that two bio crypt contexts are compatible, and also
|
|
* that their data_unit_nums are continuous (and can hence be merged)
|
|
* in the order @bc1 followed by @bc2.
|
|
*/
|
|
bool bio_crypt_ctx_mergeable(struct bio_crypt_ctx *bc1, unsigned int bc1_bytes,
|
|
struct bio_crypt_ctx *bc2)
|
|
{
|
|
if (!bio_crypt_ctx_compatible(bc1, bc2))
|
|
return false;
|
|
|
|
return !bc1 || bio_crypt_dun_is_contiguous(bc1, bc1_bytes, bc2->bc_dun);
|
|
}
|
|
|
|
/* Check that all I/O segments are data unit aligned. */
|
|
static bool bio_crypt_check_alignment(struct bio *bio)
|
|
{
|
|
const unsigned int data_unit_size =
|
|
bio->bi_crypt_context->bc_key->crypto_cfg.data_unit_size;
|
|
struct bvec_iter iter;
|
|
struct bio_vec bv;
|
|
|
|
bio_for_each_segment(bv, bio, iter) {
|
|
if (!IS_ALIGNED(bv.bv_len | bv.bv_offset, data_unit_size))
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
blk_status_t __blk_crypto_init_request(struct request *rq)
|
|
{
|
|
return blk_crypto_get_keyslot(rq->q->crypto_profile,
|
|
rq->crypt_ctx->bc_key,
|
|
&rq->crypt_keyslot);
|
|
}
|
|
|
|
/**
|
|
* __blk_crypto_free_request - Uninitialize the crypto fields of a request.
|
|
*
|
|
* @rq: The request whose crypto fields to uninitialize.
|
|
*
|
|
* Completely uninitializes the crypto fields of a request. If a keyslot has
|
|
* been programmed into some inline encryption hardware, that keyslot is
|
|
* released. The rq->crypt_ctx is also freed.
|
|
*/
|
|
void __blk_crypto_free_request(struct request *rq)
|
|
{
|
|
blk_crypto_put_keyslot(rq->crypt_keyslot);
|
|
mempool_free(rq->crypt_ctx, bio_crypt_ctx_pool);
|
|
blk_crypto_rq_set_defaults(rq);
|
|
}
|
|
|
|
/**
|
|
* __blk_crypto_bio_prep - Prepare bio for inline encryption
|
|
*
|
|
* @bio_ptr: pointer to original bio pointer
|
|
*
|
|
* If the bio crypt context provided for the bio is supported by the underlying
|
|
* device's inline encryption hardware, do nothing.
|
|
*
|
|
* Otherwise, try to perform en/decryption for this bio by falling back to the
|
|
* kernel crypto API. When the crypto API fallback is used for encryption,
|
|
* blk-crypto may choose to split the bio into 2 - the first one that will
|
|
* continue to be processed and the second one that will be resubmitted via
|
|
* submit_bio_noacct. A bounce bio will be allocated to encrypt the contents
|
|
* of the aforementioned "first one", and *bio_ptr will be updated to this
|
|
* bounce bio.
|
|
*
|
|
* Caller must ensure bio has bio_crypt_ctx.
|
|
*
|
|
* Return: true on success; false on error (and bio->bi_status will be set
|
|
* appropriately, and bio_endio() will have been called so bio
|
|
* submission should abort).
|
|
*/
|
|
bool __blk_crypto_bio_prep(struct bio **bio_ptr)
|
|
{
|
|
struct bio *bio = *bio_ptr;
|
|
const struct blk_crypto_key *bc_key = bio->bi_crypt_context->bc_key;
|
|
|
|
/* Error if bio has no data. */
|
|
if (WARN_ON_ONCE(!bio_has_data(bio))) {
|
|
bio->bi_status = BLK_STS_IOERR;
|
|
goto fail;
|
|
}
|
|
|
|
if (!bio_crypt_check_alignment(bio)) {
|
|
bio->bi_status = BLK_STS_IOERR;
|
|
goto fail;
|
|
}
|
|
|
|
/*
|
|
* Success if device supports the encryption context, or if we succeeded
|
|
* in falling back to the crypto API.
|
|
*/
|
|
if (blk_crypto_config_supported_natively(bio->bi_bdev,
|
|
&bc_key->crypto_cfg))
|
|
return true;
|
|
if (blk_crypto_fallback_bio_prep(bio_ptr))
|
|
return true;
|
|
fail:
|
|
bio_endio(*bio_ptr);
|
|
return false;
|
|
}
|
|
|
|
int __blk_crypto_rq_bio_prep(struct request *rq, struct bio *bio,
|
|
gfp_t gfp_mask)
|
|
{
|
|
if (!rq->crypt_ctx) {
|
|
rq->crypt_ctx = mempool_alloc(bio_crypt_ctx_pool, gfp_mask);
|
|
if (!rq->crypt_ctx)
|
|
return -ENOMEM;
|
|
}
|
|
*rq->crypt_ctx = *bio->bi_crypt_context;
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* blk_crypto_init_key() - Prepare a key for use with blk-crypto
|
|
* @blk_key: Pointer to the blk_crypto_key to initialize.
|
|
* @raw_key: Pointer to the raw key. Must be the correct length for the chosen
|
|
* @crypto_mode; see blk_crypto_modes[].
|
|
* @crypto_mode: identifier for the encryption algorithm to use
|
|
* @dun_bytes: number of bytes that will be used to specify the DUN when this
|
|
* key is used
|
|
* @data_unit_size: the data unit size to use for en/decryption
|
|
*
|
|
* Return: 0 on success, -errno on failure. The caller is responsible for
|
|
* zeroizing both blk_key and raw_key when done with them.
|
|
*/
|
|
int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key,
|
|
enum blk_crypto_mode_num crypto_mode,
|
|
unsigned int dun_bytes,
|
|
unsigned int data_unit_size)
|
|
{
|
|
const struct blk_crypto_mode *mode;
|
|
|
|
memset(blk_key, 0, sizeof(*blk_key));
|
|
|
|
if (crypto_mode >= ARRAY_SIZE(blk_crypto_modes))
|
|
return -EINVAL;
|
|
|
|
mode = &blk_crypto_modes[crypto_mode];
|
|
if (mode->keysize == 0)
|
|
return -EINVAL;
|
|
|
|
if (dun_bytes == 0 || dun_bytes > mode->ivsize)
|
|
return -EINVAL;
|
|
|
|
if (!is_power_of_2(data_unit_size))
|
|
return -EINVAL;
|
|
|
|
blk_key->crypto_cfg.crypto_mode = crypto_mode;
|
|
blk_key->crypto_cfg.dun_bytes = dun_bytes;
|
|
blk_key->crypto_cfg.data_unit_size = data_unit_size;
|
|
blk_key->data_unit_size_bits = ilog2(data_unit_size);
|
|
blk_key->size = mode->keysize;
|
|
memcpy(blk_key->raw, raw_key, mode->keysize);
|
|
|
|
return 0;
|
|
}
|
|
|
|
bool blk_crypto_config_supported_natively(struct block_device *bdev,
|
|
const struct blk_crypto_config *cfg)
|
|
{
|
|
return __blk_crypto_cfg_supported(bdev_get_queue(bdev)->crypto_profile,
|
|
cfg);
|
|
}
|
|
|
|
/*
|
|
* Check if bios with @cfg can be en/decrypted by blk-crypto (i.e. either the
|
|
* block_device it's submitted to supports inline crypto, or the
|
|
* blk-crypto-fallback is enabled and supports the cfg).
|
|
*/
|
|
bool blk_crypto_config_supported(struct block_device *bdev,
|
|
const struct blk_crypto_config *cfg)
|
|
{
|
|
return IS_ENABLED(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) ||
|
|
blk_crypto_config_supported_natively(bdev, cfg);
|
|
}
|
|
|
|
/**
|
|
* blk_crypto_start_using_key() - Start using a blk_crypto_key on a device
|
|
* @bdev: block device to operate on
|
|
* @key: A key to use on the device
|
|
*
|
|
* Upper layers must call this function to ensure that either the hardware
|
|
* supports the key's crypto settings, or the crypto API fallback has transforms
|
|
* for the needed mode allocated and ready to go. This function may allocate
|
|
* an skcipher, and *should not* be called from the data path, since that might
|
|
* cause a deadlock
|
|
*
|
|
* Return: 0 on success; -ENOPKG if the hardware doesn't support the key and
|
|
* blk-crypto-fallback is either disabled or the needed algorithm
|
|
* is disabled in the crypto API; or another -errno code.
|
|
*/
|
|
int blk_crypto_start_using_key(struct block_device *bdev,
|
|
const struct blk_crypto_key *key)
|
|
{
|
|
if (blk_crypto_config_supported_natively(bdev, &key->crypto_cfg))
|
|
return 0;
|
|
return blk_crypto_fallback_start_using_mode(key->crypto_cfg.crypto_mode);
|
|
}
|
|
|
|
/**
|
|
* blk_crypto_evict_key() - Evict a key from any inline encryption hardware
|
|
* it may have been programmed into
|
|
* @bdev: The block_device who's associated inline encryption hardware this key
|
|
* might have been programmed into
|
|
* @key: The key to evict
|
|
*
|
|
* Upper layers (filesystems) must call this function to ensure that a key is
|
|
* evicted from any hardware that it might have been programmed into. The key
|
|
* must not be in use by any in-flight IO when this function is called.
|
|
*
|
|
* Return: 0 on success or if the key wasn't in any keyslot; -errno on error.
|
|
*/
|
|
int blk_crypto_evict_key(struct block_device *bdev,
|
|
const struct blk_crypto_key *key)
|
|
{
|
|
struct request_queue *q = bdev_get_queue(bdev);
|
|
|
|
if (blk_crypto_config_supported_natively(bdev, &key->crypto_cfg))
|
|
return __blk_crypto_evict_key(q->crypto_profile, key);
|
|
|
|
/*
|
|
* If the block_device didn't support the key, then blk-crypto-fallback
|
|
* may have been used, so try to evict the key from blk-crypto-fallback.
|
|
*/
|
|
return blk_crypto_fallback_evict_key(key);
|
|
}
|
|
EXPORT_SYMBOL_GPL(blk_crypto_evict_key);
|