mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
blk-crypto: show supported key types in sysfs
Add sysfs files that indicate which type(s) of keys are supported by the inline encryption hardware associated with a particular request queue: /sys/block/$disk/queue/crypto/hw_wrapped_keys /sys/block/$disk/queue/crypto/raw_keys Userspace can use the presence or absence of these files to decide what encyption settings to use. Don't use a single key_type file, as devices might support both key types at the same time. Signed-off-by: Eric Biggers <ebiggers@google.com> Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650 Link: https://lore.kernel.org/r/20250204060041.409950-3-ebiggers@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -229,6 +229,17 @@ Description:
|
||||
encryption, refer to Documentation/block/inline-encryption.rst.
|
||||
|
||||
|
||||
What: /sys/block/<disk>/queue/crypto/hw_wrapped_keys
|
||||
Date: February 2025
|
||||
Contact: linux-block@vger.kernel.org
|
||||
Description:
|
||||
[RO] The presence of this file indicates that the device
|
||||
supports hardware-wrapped inline encryption keys, i.e. key blobs
|
||||
that can only be unwrapped and used by dedicated hardware. For
|
||||
more information about hardware-wrapped inline encryption keys,
|
||||
see Documentation/block/inline-encryption.rst.
|
||||
|
||||
|
||||
What: /sys/block/<disk>/queue/crypto/max_dun_bits
|
||||
Date: February 2022
|
||||
Contact: linux-block@vger.kernel.org
|
||||
@@ -267,6 +278,15 @@ Description:
|
||||
use with inline encryption.
|
||||
|
||||
|
||||
What: /sys/block/<disk>/queue/crypto/raw_keys
|
||||
Date: February 2025
|
||||
Contact: linux-block@vger.kernel.org
|
||||
Description:
|
||||
[RO] The presence of this file indicates that the device
|
||||
supports raw inline encryption keys, i.e. keys that are managed
|
||||
in raw, plaintext form in software.
|
||||
|
||||
|
||||
What: /sys/block/<disk>/queue/dax
|
||||
Date: June 2016
|
||||
Contact: linux-block@vger.kernel.org
|
||||
|
||||
Reference in New Issue
Block a user