Skip to content

block: export blk-crypto symbols required by dm-inlinecrypt#732

Open
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
series/1079778=>linus-master
Open

block: export blk-crypto symbols required by dm-inlinecrypt#732
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
series/1079778=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Apr 10, 2026

Pull request for series with
subject: block: export blk-crypto symbols required by dm-inlinecrypt
version: 2
url: https://patchwork.kernel.org/project/linux-block/list/?series=1079778

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 10, 2026

Upstream branch: 9a9c8ce
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 13, 2026

Upstream branch: 028ef9c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from b38f8b4 to 11e68c8 Compare April 13, 2026 06:23
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 8f17195 to 6b4d829 Compare April 14, 2026 06:46
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 14, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from 11e68c8 to b664f59 Compare April 14, 2026 06:50
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6b4d829 to ceec5ed Compare April 21, 2026 06:51
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 21, 2026

Upstream branch: b4e0758
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from b664f59 to 2f02568 Compare April 21, 2026 07:05
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ceec5ed to 3b54e52 Compare April 22, 2026 20:20
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 22, 2026

Upstream branch: 6596a02
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from 2f02568 to 6b1f1b7 Compare April 22, 2026 20:29
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 3b54e52 to 6a0b974 Compare April 23, 2026 16:58
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 23, 2026

Upstream branch: 507bd4b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from 6b1f1b7 to 16cf61e Compare April 23, 2026 17:07
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6a0b974 to 59ca59b Compare April 24, 2026 00:56
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from 16cf61e to f66ceb5 Compare April 24, 2026 01:04
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from 94f0438 to 857ada9 Compare April 24, 2026 07:54
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1079778
version: 2

ebiggers and others added 3 commits April 24, 2026 16:59
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 <[email protected]>
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.

dm-inlinecrypt supports both keyring key and hex key, the former avoids
the key to be exposed in dm-table message. Similar to dm-default-key in
Android, it will fallabck to the software block crypto once the inline
crypto hardware cannot support the expected cipher.

Test:
dmsetup create inlinecrypt_logon --table "0 `blockdev --getsz $1` \
inlinecrypt aes-xts-plain64 :64:logon:fde:dminlinecrypt_test_key 0 $1 0"

Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Linlin Zhang <[email protected]>
This adds the admin-guide documentation for dm-inlinecrypt.

dm-inlinecrypt.rst is the guide to using dm-inlinecrypt.

Signed-off-by: Linlin Zhang <[email protected]>
@blktests-ci blktests-ci Bot force-pushed the series/1079778=>linus-master branch from f66ceb5 to cd338cf Compare April 24, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant