diff options
author | Greg Joyce <gjoyce@linux.vnet.ibm.com> | 2023-07-22 00:15:34 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-08-22 20:10:26 +0300 |
commit | 3bfeb61256643281ac4be5b8a57e9d9da3db4335 (patch) | |
tree | 71ffd9e63c62a0b114a72cd258e107db66473c7b /include/uapi/linux/sed-opal.h | |
parent | 5c82efc1aee8eb0919aa67a0d2559de5a326bd7c (diff) | |
download | linux-3bfeb61256643281ac4be5b8a57e9d9da3db4335.tar.xz |
block: sed-opal: keyring support for SED keys
Extend the SED block driver so it can alternatively
obtain a key from a sed-opal kernel keyring. The SED
ioctls will indicate the source of the key, either
directly in the ioctl data or from the keyring.
This allows the use of SED commands in scripts such as
udev scripts so that drives may be automatically unlocked
as they become available.
Signed-off-by: Greg Joyce <gjoyce@linux.vnet.ibm.com>
Reviewed-by: Jonathan Derrick <jonathan.derrick@linux.dev>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/r/20230721211534.3437070-4-gjoyce@linux.vnet.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/sed-opal.h')
-rw-r--r-- | include/uapi/linux/sed-opal.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/uapi/linux/sed-opal.h b/include/uapi/linux/sed-opal.h index 4e10675751b4..d3994b7716bc 100644 --- a/include/uapi/linux/sed-opal.h +++ b/include/uapi/linux/sed-opal.h @@ -49,10 +49,16 @@ enum opal_lock_flags { OPAL_SAVE_FOR_LOCK = 0x01, }; +enum opal_key_type { + OPAL_INCLUDED = 0, /* key[] is the key */ + OPAL_KEYRING, /* key is in keyring */ +}; + struct opal_key { __u8 lr; __u8 key_len; - __u8 __align[6]; + __u8 key_type; + __u8 __align[5]; __u8 key[OPAL_KEY_MAX]; }; |