]> git.baikalelectronics.ru Git - kernel.git/commit
block: blk-crypto-fallback for Inline Encryption
authorSatya Tangirala <satyat@google.com>
Thu, 14 May 2020 00:37:20 +0000 (00:37 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 May 2020 15:48:03 +0000 (09:48 -0600)
commit4df6504f4f9a86fb5761cc0638108cc1d9603fc4
treeda8aeb7ca2c295811a9b3cc209470064cec5fe75
parent43e0f7438c49a3376e37e2ec2e687d910dbf4a5f
block: blk-crypto-fallback for Inline Encryption

Blk-crypto delegates crypto operations to inline encryption hardware
when available. The separately configurable blk-crypto-fallback contains
a software fallback to the kernel crypto API - when enabled, blk-crypto
will use this fallback for en/decryption when inline encryption hardware
is not available.

This lets upper layers not have to worry about whether or not the
underlying device has support for inline encryption before deciding to
specify an encryption context for a bio. It also allows for testing
without actual inline encryption hardware - in particular, it makes it
possible to test the inline encryption code in ext4 and f2fs simply by
running xfstests with the inlinecrypt mount option, which in turn allows
for things like the regular upstream regression testing of ext4 to cover
the inline encryption code paths.

For more details, refer to Documentation/block/inline-encryption.rst.

Signed-off-by: Satya Tangirala <satyat@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/Kconfig
block/Makefile
block/blk-crypto-fallback.c [new file with mode: 0644]
block/blk-crypto-internal.h
block/blk-crypto.c
include/linux/blk-crypto.h