mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 14:30:06 -04:00
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>
This commit is contained in:
@@ -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];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user