mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
opal: do not initialize LRs array in activation.
The lr member in opal_lr_act kernel structure is ingnored unless the device is being activated in SUM mode. See kernel implementation of IOC_OPAL_ACTIVATE_LSP in block/sed-opal.c
This commit is contained in:
@@ -415,11 +415,8 @@ static int opal_activate_lsp(struct crypt_device *cd, int fd,
|
|||||||
.key = {
|
.key = {
|
||||||
.key_len = admin_key_len,
|
.key_len = admin_key_len,
|
||||||
},
|
},
|
||||||
.num_lrs = 8,
|
/* useless but due to kernel bug it requires (num_lrs > 0 && num_lrs <= 9) */
|
||||||
/* A max of 9 segments are supported, enable them all as there's no reason not to
|
.num_lrs = 1,
|
||||||
* (0 is whole-volume)
|
|
||||||
*/
|
|
||||||
.lr = { 1, 2, 3, 4, 5, 6, 7, 8 },
|
|
||||||
};
|
};
|
||||||
crypt_safe_memcpy(activate->key.key, admin_key, admin_key_len);
|
crypt_safe_memcpy(activate->key.key, admin_key, admin_key_len);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user