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.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -49,10 +49,16 @@ enum opal_lock_flags { · 48 unmodified lines | |||
| 49 | OPAL_SAVE_FOR_LOCK = 0x01, | 49 | OPAL_SAVE_FOR_LOCK = 0x01, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | enum opal_key_type { | ||
| 53 | OPAL_INCLUDED = 0, /* key[] is the key */ | ||
| 54 | OPAL_KEYRING, /* key is in keyring */ | ||
| 55 | }; | ||
| 56 | |||
| 52 | struct opal_key { | 57 | struct opal_key { |
| 53 | __u8 lr; | 58 | __u8 lr; |
| 54 | __u8 key_len; | 59 | __u8 key_len; |
| 55 | __u8 __align[6]; | 60 | __u8 key_type; |
| 61 | __u8 __align[5]; | ||
| 56 | __u8 key[OPAL_KEY_MAX]; | 62 | __u8 key[OPAL_KEY_MAX]; |
| 57 | }; | 63 | }; |
| 58 | 64 | ||