154b259f6SSatya Tangirala.. SPDX-License-Identifier: GPL-2.0 254b259f6SSatya Tangirala 354b259f6SSatya Tangirala================= 454b259f6SSatya TangiralaInline Encryption 554b259f6SSatya Tangirala================= 654b259f6SSatya Tangirala 754b259f6SSatya TangiralaBackground 854b259f6SSatya Tangirala========== 954b259f6SSatya Tangirala 10*8e9f666aSEric BiggersInline encryption hardware sits logically between memory and disk, and can 11*8e9f666aSEric Biggersen/decrypt data as it goes in/out of the disk. For each I/O request, software 12*8e9f666aSEric Biggerscan control exactly how the inline encryption hardware will en/decrypt the data 13*8e9f666aSEric Biggersin terms of key, algorithm, data unit size (the granularity of en/decryption), 14*8e9f666aSEric Biggersand data unit number (a value that determines the initialization vector(s)). 1554b259f6SSatya Tangirala 16*8e9f666aSEric BiggersSome inline encryption hardware accepts all encryption parameters including raw 17*8e9f666aSEric Biggerskeys directly in low-level I/O requests. However, most inline encryption 18*8e9f666aSEric Biggershardware instead has a fixed number of "keyslots" and requires that the key, 19*8e9f666aSEric Biggersalgorithm, and data unit size first be programmed into a keyslot. Each 20*8e9f666aSEric Biggerslow-level I/O request then just contains a keyslot index and data unit number. 21*8e9f666aSEric Biggers 22*8e9f666aSEric BiggersNote that inline encryption hardware is very different from traditional crypto 23*8e9f666aSEric Biggersaccelerators, which are supported through the kernel crypto API. Traditional 24*8e9f666aSEric Biggerscrypto accelerators operate on memory regions, whereas inline encryption 25*8e9f666aSEric Biggershardware operates on I/O requests. Thus, inline encryption hardware needs to be 26*8e9f666aSEric Biggersmanaged by the block layer, not the kernel crypto API. 27*8e9f666aSEric Biggers 28*8e9f666aSEric BiggersInline encryption hardware is also very different from "self-encrypting drives", 29*8e9f666aSEric Biggerssuch as those based on the TCG Opal or ATA Security standards. Self-encrypting 30*8e9f666aSEric Biggersdrives don't provide fine-grained control of encryption and provide no way to 31*8e9f666aSEric Biggersverify the correctness of the resulting ciphertext. Inline encryption hardware 32*8e9f666aSEric Biggersprovides fine-grained control of encryption, including the choice of key and 33*8e9f666aSEric Biggersinitialization vector for each sector, and can be tested for correctness. 3454b259f6SSatya Tangirala 3554b259f6SSatya TangiralaObjective 3654b259f6SSatya Tangirala========= 3754b259f6SSatya Tangirala 38*8e9f666aSEric BiggersWe want to support inline encryption in the kernel. To make testing easier, we 39*8e9f666aSEric Biggersalso want support for falling back to the kernel crypto API when actual inline 40*8e9f666aSEric Biggersencryption hardware is absent. We also want inline encryption to work with 41*8e9f666aSEric Biggerslayered devices like device-mapper and loopback (i.e. we want to be able to use 42*8e9f666aSEric Biggersthe inline encryption hardware of the underlying devices if present, or else 43*8e9f666aSEric Biggersfall back to crypto API en/decryption). 4454b259f6SSatya Tangirala 4554b259f6SSatya TangiralaConstraints and notes 4654b259f6SSatya Tangirala===================== 4754b259f6SSatya Tangirala 48*8e9f666aSEric Biggers- We need a way for upper layers (e.g. filesystems) to specify an encryption 49*8e9f666aSEric Biggers context to use for en/decrypting a bio, and device drivers (e.g. UFSHCD) need 50*8e9f666aSEric Biggers to be able to use that encryption context when they process the request. 51*8e9f666aSEric Biggers Encryption contexts also introduce constraints on bio merging; the block layer 52*8e9f666aSEric Biggers needs to be aware of these constraints. 5354b259f6SSatya Tangirala 54*8e9f666aSEric Biggers- Different inline encryption hardware has different supported algorithms, 55*8e9f666aSEric Biggers supported data unit sizes, maximum data unit numbers, etc. We call these 56*8e9f666aSEric Biggers properties the "crypto capabilities". We need a way for device drivers to 57*8e9f666aSEric Biggers advertise crypto capabilities to upper layers in a generic way. 5854b259f6SSatya Tangirala 59*8e9f666aSEric Biggers- Inline encryption hardware usually (but not always) requires that keys be 60*8e9f666aSEric Biggers programmed into keyslots before being used. Since programming keyslots may be 61*8e9f666aSEric Biggers slow and there may not be very many keyslots, we shouldn't just program the 62*8e9f666aSEric Biggers key for every I/O request, but rather keep track of which keys are in the 63*8e9f666aSEric Biggers keyslots and reuse an already-programmed keyslot when possible. 6454b259f6SSatya Tangirala 65*8e9f666aSEric Biggers- Upper layers typically define a specific end-of-life for crypto keys, e.g. 66*8e9f666aSEric Biggers when an encrypted directory is locked or when a crypto mapping is torn down. 67*8e9f666aSEric Biggers At these times, keys are wiped from memory. We must provide a way for upper 68*8e9f666aSEric Biggers layers to also evict keys from any keyslots they are present in. 6954b259f6SSatya Tangirala 70*8e9f666aSEric Biggers- When possible, device-mapper devices must be able to pass through the inline 71*8e9f666aSEric Biggers encryption support of their underlying devices. However, it doesn't make 72*8e9f666aSEric Biggers sense for device-mapper devices to have keyslots themselves. 7354b259f6SSatya Tangirala 74*8e9f666aSEric BiggersBasic design 75*8e9f666aSEric Biggers============ 7654b259f6SSatya Tangirala 77*8e9f666aSEric BiggersWe introduce ``struct blk_crypto_key`` to represent an inline encryption key and 78*8e9f666aSEric Biggershow it will be used. This includes the actual bytes of the key; the size of the 79*8e9f666aSEric Biggerskey; the algorithm and data unit size the key will be used with; and the number 80*8e9f666aSEric Biggersof bytes needed to represent the maximum data unit number the key will be used 81*8e9f666aSEric Biggerswith. 8254b259f6SSatya Tangirala 83*8e9f666aSEric BiggersWe introduce ``struct bio_crypt_ctx`` to represent an encryption context. It 84*8e9f666aSEric Biggerscontains a data unit number and a pointer to a blk_crypto_key. We add pointers 85*8e9f666aSEric Biggersto a bio_crypt_ctx to ``struct bio`` and ``struct request``; this allows users 86*8e9f666aSEric Biggersof the block layer (e.g. filesystems) to provide an encryption context when 87*8e9f666aSEric Biggerscreating a bio and have it be passed down the stack for processing by the block 88*8e9f666aSEric Biggerslayer and device drivers. Note that the encryption context doesn't explicitly 89*8e9f666aSEric Biggerssay whether to encrypt or decrypt, as that is implicit from the direction of the 90*8e9f666aSEric Biggersbio; WRITE means encrypt, and READ means decrypt. 9154b259f6SSatya Tangirala 92*8e9f666aSEric BiggersWe also introduce ``struct blk_crypto_profile`` to contain all generic inline 93*8e9f666aSEric Biggersencryption-related state for a particular inline encryption device. The 94*8e9f666aSEric Biggersblk_crypto_profile serves as the way that drivers for inline encryption hardware 95*8e9f666aSEric Biggersadvertise their crypto capabilities and provide certain functions (e.g., 96*8e9f666aSEric Biggersfunctions to program and evict keys) to upper layers. Each device driver that 97*8e9f666aSEric Biggerswants to support inline encryption will construct a blk_crypto_profile, then 98*8e9f666aSEric Biggersassociate it with the disk's request_queue. 9954b259f6SSatya Tangirala 100*8e9f666aSEric BiggersThe blk_crypto_profile also manages the hardware's keyslots, when applicable. 101*8e9f666aSEric BiggersThis happens in the block layer, so that users of the block layer can just 102*8e9f666aSEric Biggersspecify encryption contexts and don't need to know about keyslots at all, nor do 103*8e9f666aSEric Biggersdevice drivers need to care about most details of keyslot management. 10454b259f6SSatya Tangirala 105*8e9f666aSEric BiggersSpecifically, for each keyslot, the block layer (via the blk_crypto_profile) 106*8e9f666aSEric Biggerskeeps track of which blk_crypto_key that keyslot contains (if any), and how many 107*8e9f666aSEric Biggersin-flight I/O requests are using it. When the block layer creates a 108*8e9f666aSEric Biggers``struct request`` for a bio that has an encryption context, it grabs a keyslot 109*8e9f666aSEric Biggersthat already contains the key if possible. Otherwise it waits for an idle 110*8e9f666aSEric Biggerskeyslot (a keyslot that isn't in-use by any I/O), then programs the key into the 111*8e9f666aSEric Biggersleast-recently-used idle keyslot using the function the device driver provided. 112*8e9f666aSEric BiggersIn both cases, the resulting keyslot is stored in the ``crypt_keyslot`` field of 113*8e9f666aSEric Biggersthe request, where it is then accessible to device drivers and is released after 114*8e9f666aSEric Biggersthe request completes. 11554b259f6SSatya Tangirala 116*8e9f666aSEric Biggers``struct request`` also contains a pointer to the original bio_crypt_ctx. 117*8e9f666aSEric BiggersRequests can be built from multiple bios, and the block layer must take the 118*8e9f666aSEric Biggersencryption context into account when trying to merge bios and requests. For two 119*8e9f666aSEric Biggersbios/requests to be merged, they must have compatible encryption contexts: both 120*8e9f666aSEric Biggersunencrypted, or both encrypted with the same key and contiguous data unit 121*8e9f666aSEric Biggersnumbers. Only the encryption context for the first bio in a request is 122*8e9f666aSEric Biggersretained, since the remaining bios have been verified to be merge-compatible 123*8e9f666aSEric Biggerswith the first bio. 12454b259f6SSatya Tangirala 125*8e9f666aSEric BiggersTo make it possible for inline encryption to work with request_queue based 126*8e9f666aSEric Biggerslayered devices, when a request is cloned, its encryption context is cloned as 127*8e9f666aSEric Biggerswell. When the cloned request is submitted, it is then processed as usual; this 128*8e9f666aSEric Biggersincludes getting a keyslot from the clone's target device if needed. 12954b259f6SSatya Tangirala 130*8e9f666aSEric Biggersblk-crypto-fallback 131*8e9f666aSEric Biggers=================== 13254b259f6SSatya Tangirala 133*8e9f666aSEric BiggersIt is desirable for the inline encryption support of upper layers (e.g. 134*8e9f666aSEric Biggersfilesystems) to be testable without real inline encryption hardware, and 135*8e9f666aSEric Biggerslikewise for the block layer's keyslot management logic. It is also desirable 136*8e9f666aSEric Biggersto allow upper layers to just always use inline encryption rather than have to 137*8e9f666aSEric Biggersimplement encryption in multiple ways. 13854b259f6SSatya Tangirala 139*8e9f666aSEric BiggersTherefore, we also introduce *blk-crypto-fallback*, which is an implementation 140*8e9f666aSEric Biggersof inline encryption using the kernel crypto API. blk-crypto-fallback is built 141*8e9f666aSEric Biggersinto the block layer, so it works on any block device without any special setup. 142*8e9f666aSEric BiggersEssentially, when a bio with an encryption context is submitted to a 143*8e9f666aSEric Biggersrequest_queue that doesn't support that encryption context, the block layer will 144*8e9f666aSEric Biggershandle en/decryption of the bio using blk-crypto-fallback. 145*8e9f666aSEric Biggers 146*8e9f666aSEric BiggersFor encryption, the data cannot be encrypted in-place, as callers usually rely 147*8e9f666aSEric Biggerson it being unmodified. Instead, blk-crypto-fallback allocates bounce pages, 148*8e9f666aSEric Biggersfills a new bio with those bounce pages, encrypts the data into those bounce 149*8e9f666aSEric Biggerspages, and submits that "bounce" bio. When the bounce bio completes, 150*8e9f666aSEric Biggersblk-crypto-fallback completes the original bio. If the original bio is too 151*8e9f666aSEric Biggerslarge, multiple bounce bios may be required; see the code for details. 152*8e9f666aSEric Biggers 153*8e9f666aSEric BiggersFor decryption, blk-crypto-fallback "wraps" the bio's completion callback 154*8e9f666aSEric Biggers(``bi_complete``) and private data (``bi_private``) with its own, unsets the 155*8e9f666aSEric Biggersbio's encryption context, then submits the bio. If the read completes 156*8e9f666aSEric Biggerssuccessfully, blk-crypto-fallback restores the bio's original completion 157*8e9f666aSEric Biggerscallback and private data, then decrypts the bio's data in-place using the 158*8e9f666aSEric Biggerskernel crypto API. Decryption happens from a workqueue, as it may sleep. 159*8e9f666aSEric BiggersAfterwards, blk-crypto-fallback completes the bio. 160*8e9f666aSEric Biggers 161*8e9f666aSEric BiggersIn both cases, the bios that blk-crypto-fallback submits no longer have an 162*8e9f666aSEric Biggersencryption context. Therefore, lower layers only see standard unencrypted I/O. 163*8e9f666aSEric Biggers 164*8e9f666aSEric Biggersblk-crypto-fallback also defines its own blk_crypto_profile and has its own 165*8e9f666aSEric Biggers"keyslots"; its keyslots contain ``struct crypto_skcipher`` objects. The reason 166*8e9f666aSEric Biggersfor this is twofold. First, it allows the keyslot management logic to be tested 167*8e9f666aSEric Biggerswithout actual inline encryption hardware. Second, similar to actual inline 168*8e9f666aSEric Biggersencryption hardware, the crypto API doesn't accept keys directly in requests but 169*8e9f666aSEric Biggersrather requires that keys be set ahead of time, and setting keys can be 170*8e9f666aSEric Biggersexpensive; moreover, allocating a crypto_skcipher can't happen on the I/O path 171*8e9f666aSEric Biggersat all due to the locks it takes. Therefore, the concept of keyslots still 172*8e9f666aSEric Biggersmakes sense for blk-crypto-fallback. 173*8e9f666aSEric Biggers 174*8e9f666aSEric BiggersNote that regardless of whether real inline encryption hardware or 17554b259f6SSatya Tangiralablk-crypto-fallback is used, the ciphertext written to disk (and hence the 176*8e9f666aSEric Biggerson-disk format of data) will be the same (assuming that both the inline 177*8e9f666aSEric Biggersencryption hardware's implementation and the kernel crypto API's implementation 178*8e9f666aSEric Biggersof the algorithm being used adhere to spec and function correctly). 17954b259f6SSatya Tangirala 180*8e9f666aSEric Biggersblk-crypto-fallback is optional and is controlled by the 181*8e9f666aSEric Biggers``CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK`` kernel configuration option. 18254b259f6SSatya Tangirala 18354b259f6SSatya TangiralaAPI presented to users of the block layer 18454b259f6SSatya Tangirala========================================= 18554b259f6SSatya Tangirala 186*8e9f666aSEric Biggers``blk_crypto_config_supported()`` allows users to check ahead of time whether 187*8e9f666aSEric Biggersinline encryption with particular crypto settings will work on a particular 188*8e9f666aSEric Biggersrequest_queue -- either via hardware or via blk-crypto-fallback. This function 189*8e9f666aSEric Biggerstakes in a ``struct blk_crypto_config`` which is like blk_crypto_key, but omits 190*8e9f666aSEric Biggersthe actual bytes of the key and instead just contains the algorithm, data unit 191*8e9f666aSEric Biggerssize, etc. This function can be useful if blk-crypto-fallback is disabled. 19254b259f6SSatya Tangirala 193*8e9f666aSEric Biggers``blk_crypto_init_key()`` allows users to initialize a blk_crypto_key. 19454b259f6SSatya Tangirala 195*8e9f666aSEric BiggersUsers must call ``blk_crypto_start_using_key()`` before actually starting to use 196*8e9f666aSEric Biggersa blk_crypto_key on a request_queue (even if ``blk_crypto_config_supported()`` 197*8e9f666aSEric Biggerswas called earlier). This is needed to initialize blk-crypto-fallback if it 198*8e9f666aSEric Biggerswill be needed. This must not be called from the data path, as this may have to 199*8e9f666aSEric Biggersallocate resources, which may deadlock in that case. 20054b259f6SSatya Tangirala 201*8e9f666aSEric BiggersNext, to attach an encryption context to a bio, users should call 202*8e9f666aSEric Biggers``bio_crypt_set_ctx()``. This function allocates a bio_crypt_ctx and attaches 203*8e9f666aSEric Biggersit to a bio, given the blk_crypto_key and the data unit number that will be used 204*8e9f666aSEric Biggersfor en/decryption. Users don't need to worry about freeing the bio_crypt_ctx 205*8e9f666aSEric Biggerslater, as that happens automatically when the bio is freed or reset. 20654b259f6SSatya Tangirala 207*8e9f666aSEric BiggersFinally, when done using inline encryption with a blk_crypto_key on a 208*8e9f666aSEric Biggersrequest_queue, users must call ``blk_crypto_evict_key()``. This ensures that 209*8e9f666aSEric Biggersthe key is evicted from all keyslots it may be programmed into and unlinked from 210*8e9f666aSEric Biggersany kernel data structures it may be linked into. 21154b259f6SSatya Tangirala 212*8e9f666aSEric BiggersIn summary, for users of the block layer, the lifecycle of a blk_crypto_key is 213*8e9f666aSEric Biggersas follows: 214*8e9f666aSEric Biggers 215*8e9f666aSEric Biggers1. ``blk_crypto_config_supported()`` (optional) 216*8e9f666aSEric Biggers2. ``blk_crypto_init_key()`` 217*8e9f666aSEric Biggers3. ``blk_crypto_start_using_key()`` 218*8e9f666aSEric Biggers4. ``bio_crypt_set_ctx()`` (potentially many times) 219*8e9f666aSEric Biggers5. ``blk_crypto_evict_key()`` (after all I/O has completed) 220*8e9f666aSEric Biggers6. Zeroize the blk_crypto_key (this has no dedicated function) 221*8e9f666aSEric Biggers 222*8e9f666aSEric BiggersIf a blk_crypto_key is being used on multiple request_queues, then 223*8e9f666aSEric Biggers``blk_crypto_config_supported()`` (if used), ``blk_crypto_start_using_key()``, 224*8e9f666aSEric Biggersand ``blk_crypto_evict_key()`` must be called on each request_queue. 22554b259f6SSatya Tangirala 22654b259f6SSatya TangiralaAPI presented to device drivers 22754b259f6SSatya Tangirala=============================== 22854b259f6SSatya Tangirala 229*8e9f666aSEric BiggersA device driver that wants to support inline encryption must set up a 230*8e9f666aSEric Biggersblk_crypto_profile in the request_queue of its device. To do this, it first 231*8e9f666aSEric Biggersmust call ``blk_crypto_profile_init()`` (or its resource-managed variant 232*8e9f666aSEric Biggers``devm_blk_crypto_profile_init()``), providing the number of keyslots. 23354b259f6SSatya Tangirala 234*8e9f666aSEric BiggersNext, it must advertise its crypto capabilities by setting fields in the 235*8e9f666aSEric Biggersblk_crypto_profile, e.g. ``modes_supported`` and ``max_dun_bytes_supported``. 23654b259f6SSatya Tangirala 237*8e9f666aSEric BiggersIt then must set function pointers in the ``ll_ops`` field of the 238*8e9f666aSEric Biggersblk_crypto_profile to tell upper layers how to control the inline encryption 239*8e9f666aSEric Biggershardware, e.g. how to program and evict keyslots. Most drivers will need to 240*8e9f666aSEric Biggersimplement ``keyslot_program`` and ``keyslot_evict``. For details, see the 241*8e9f666aSEric Biggerscomments for ``struct blk_crypto_ll_ops``. 24254b259f6SSatya Tangirala 243*8e9f666aSEric BiggersOnce the driver registers a blk_crypto_profile with a request_queue, I/O 244*8e9f666aSEric Biggersrequests the driver receives via that queue may have an encryption context. All 245*8e9f666aSEric Biggersencryption contexts will be compatible with the crypto capabilities declared in 246*8e9f666aSEric Biggersthe blk_crypto_profile, so drivers don't need to worry about handling 247*8e9f666aSEric Biggersunsupported requests. Also, if a nonzero number of keyslots was declared in the 248*8e9f666aSEric Biggersblk_crypto_profile, then all I/O requests that have an encryption context will 249*8e9f666aSEric Biggersalso have a keyslot which was already programmed with the appropriate key. 25054b259f6SSatya Tangirala 251*8e9f666aSEric BiggersIf the driver implements runtime suspend and its blk_crypto_ll_ops don't work 252*8e9f666aSEric Biggerswhile the device is runtime-suspended, then the driver must also set the ``dev`` 253*8e9f666aSEric Biggersfield of the blk_crypto_profile to point to the ``struct device`` that will be 254*8e9f666aSEric Biggersresumed before any of the low-level operations are called. 255*8e9f666aSEric Biggers 256*8e9f666aSEric BiggersIf there are situations where the inline encryption hardware loses the contents 257*8e9f666aSEric Biggersof its keyslots, e.g. device resets, the driver must handle reprogramming the 258*8e9f666aSEric Biggerskeyslots. To do this, the driver may call ``blk_crypto_reprogram_all_keys()``. 259*8e9f666aSEric Biggers 260*8e9f666aSEric BiggersFinally, if the driver used ``blk_crypto_profile_init()`` instead of 261*8e9f666aSEric Biggers``devm_blk_crypto_profile_init()``, then it is responsible for calling 262*8e9f666aSEric Biggers``blk_crypto_profile_destroy()`` when the crypto profile is no longer needed. 26354b259f6SSatya Tangirala 26454b259f6SSatya TangiralaLayered Devices 26554b259f6SSatya Tangirala=============== 26654b259f6SSatya Tangirala 267*8e9f666aSEric BiggersRequest queue based layered devices like dm-rq that wish to support inline 268*8e9f666aSEric Biggersencryption need to create their own blk_crypto_profile for their request_queue, 269*8e9f666aSEric Biggersand expose whatever functionality they choose. When a layered device wants to 270*8e9f666aSEric Biggerspass a clone of that request to another request_queue, blk-crypto will 271*8e9f666aSEric Biggersinitialize and prepare the clone as necessary; see 272*8e9f666aSEric Biggers``blk_crypto_insert_cloned_request()``. 27354b259f6SSatya Tangirala 27454b259f6SSatya TangiralaInteraction between inline encryption and blk integrity 27554b259f6SSatya Tangirala======================================================= 27654b259f6SSatya Tangirala 27754b259f6SSatya TangiralaAt the time of this patch, there is no real hardware that supports both these 27854b259f6SSatya Tangiralafeatures. However, these features do interact with each other, and it's not 27954b259f6SSatya Tangiralacompletely trivial to make them both work together properly. In particular, 28054b259f6SSatya Tangiralawhen a WRITE bio wants to use inline encryption on a device that supports both 28154b259f6SSatya Tangiralafeatures, the bio will have an encryption context specified, after which 28254b259f6SSatya Tangiralaits integrity information is calculated (using the plaintext data, since 28354b259f6SSatya Tangiralathe encryption will happen while data is being written), and the data and 28454b259f6SSatya Tangiralaintegrity info is sent to the device. Obviously, the integrity info must be 28554b259f6SSatya Tangiralaverified before the data is encrypted. After the data is encrypted, the device 28654b259f6SSatya Tangiralamust not store the integrity info that it received with the plaintext data 28754b259f6SSatya Tangiralasince that might reveal information about the plaintext data. As such, it must 28854b259f6SSatya Tangiralare-generate the integrity info from the ciphertext data and store that on disk 28954b259f6SSatya Tangiralainstead. Another issue with storing the integrity info of the plaintext data is 29054b259f6SSatya Tangiralathat it changes the on disk format depending on whether hardware inline 29154b259f6SSatya Tangiralaencryption support is present or the kernel crypto API fallback is used (since 29254b259f6SSatya Tangiralaif the fallback is used, the device will receive the integrity info of the 29354b259f6SSatya Tangiralaciphertext, not that of the plaintext). 29454b259f6SSatya Tangirala 29554b259f6SSatya TangiralaBecause there isn't any real hardware yet, it seems prudent to assume that 29654b259f6SSatya Tangiralahardware implementations might not implement both features together correctly, 29754b259f6SSatya Tangiralaand disallow the combination for now. Whenever a device supports integrity, the 29854b259f6SSatya Tangiralakernel will pretend that the device does not support hardware inline encryption 299*8e9f666aSEric Biggers(by setting the blk_crypto_profile in the request_queue of the device to NULL). 300*8e9f666aSEric BiggersWhen the crypto API fallback is enabled, this means that all bios with and 301*8e9f666aSEric Biggersencryption context will use the fallback, and IO will complete as usual. When 302*8e9f666aSEric Biggersthe fallback is disabled, a bio with an encryption context will be failed. 303