block: Make blk-integrity preclude hardware inline encryption
authorSatya Tangirala <satyat@google.com>
Thu, 14 May 2020 00:37:19 +0000 (00:37 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 May 2020 15:48:03 +0000 (09:48 -0600)
commitd145dc23030bbf2de3a8ca5e0c29c2e568f69737
tree31bdf741552b808cfe6ce79dbf191a5087486e06
parenta892c8d52c02284076fbbacae6692aa5c5807d11
block: Make blk-integrity preclude hardware inline encryption

Whenever a device supports blk-integrity, make the kernel pretend that
the device doesn't support inline encryption (essentially by setting the
keyslot manager in the request queue to NULL).

There's no hardware currently that supports both integrity and inline
encryption. However, it seems possible that there will be such hardware
in the near future (like the NVMe key per I/O support that might support
both inline encryption and PI).

But properly integrating both features is not trivial, and without
real hardware that implements both, it is difficult to tell if it will
be done correctly by the majority of hardware that support both.
So it seems best not to support both features together right now, and
to decide what to do at probe time.

Signed-off-by: Satya Tangirala <satyat@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c
block/blk-integrity.c
block/keyslot-manager.c
include/linux/blkdev.h