]> www.infradead.org Git - users/jedix/linux-maple.git/commit
blk-crypto: show supported key types in sysfs
authorEric Biggers <ebiggers@google.com>
Tue, 4 Feb 2025 06:00:36 +0000 (22:00 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 10 Feb 2025 16:54:19 +0000 (09:54 -0700)
commite35fde43e25ad725d27315992fba8088d1210b01
tree506e84578ffd3001ae8a44318d74cf5dbc88c09c
parentebc4176551cdd021d02f4d2ed734e7b65e44442a
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>
Documentation/ABI/stable/sysfs-block
block/blk-crypto-sysfs.c