dm-inlinecrypt: add target for inline block device encryption#617
Open
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
Open
dm-inlinecrypt: add target for inline block device encryption#617blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
Conversation
Author
|
Upstream branch: 0031c06 |
6b51c57 to
78036b2
Compare
Author
|
Upstream branch: ecc64d2 |
f058d8a to
39dc73d
Compare
78036b2 to
bbb3394
Compare
Author
|
Upstream branch: c107785 |
39dc73d to
301cd5c
Compare
bbb3394 to
901a429
Compare
Author
|
Upstream branch: 5ee8dbf |
301cd5c to
1bc0cd9
Compare
901a429 to
1f19ba6
Compare
Author
|
Upstream branch: 1f318b9 |
1bc0cd9 to
e425324
Compare
1f19ba6 to
e79276a
Compare
Author
|
Upstream branch: None |
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> Reviewed-by: Jens Axboe <axboe@kernel.dk>
Add a new device-mapper target "dm-inlinecrypt" that is similar to dm-crypt but uses the blk-crypto API instead of the regular crypto API. This allows it to take advantage of inline encryption hardware such as that commonly built into UFS host controllers. The table syntax matches dm-crypt's, but for now only a stripped-down set of parameters is supported. For example, for now AES-256-XTS is the only supported cipher. dm-inlinecrypt is based on Android's dm-default-key with the controversial passthrough support removed. Note that due to the removal of passthrough support, use of dm-inlinecrypt in combination with fscrypt causes double encryption of file contents (similar to dm-crypt + fscrypt), with the fscrypt layer not being able to use the inline encryption hardware. This makes dm-inlinecrypt unusable on systems such as Android that use fscrypt and where a more optimized approach is needed. It is however suitable as a replacement for dm-crypt. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Linlin Zhang <linlin.zhang@oss.qualcomm.com>
Add a new DM flag, which means the inline crypto capabilities from underlying devices can be exposed to the DM device, and the DM device consumes these capabilities, rather pass through them to the upper layer. Signed-off-by: Linlin Zhang <linlin.zhang@oss.qualcomm.com>
e425324 to
3037167
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: dm-inlinecrypt: add target for inline block device encryption
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1061248