mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
cryptsetup: reduce the chance that we will be OOM killed
cryptsetup introduced optional locking scheme that should serialize unlocking keyslots which use memory hard key derivation function (argon2). Using the serialization should prevent OOM situation in early boot while unlocking encrypted volumes.
This commit is contained in:
parent
6cf5c3318f
commit
408c81f624
@ -599,6 +599,12 @@ static uint32_t determine_flags(void) {
|
||||
if (arg_submit_from_crypt_cpus)
|
||||
flags |= CRYPT_ACTIVATE_SUBMIT_FROM_CRYPT_CPUS;
|
||||
|
||||
#ifdef CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF
|
||||
/* Try to decrease the risk of OOM event if memory hard key derivation function is in use */
|
||||
/* https://gitlab.com/cryptsetup/cryptsetup/issues/446/ */
|
||||
flags |= CRYPT_ACTIVATE_SERIALIZE_MEMORY_HARD_PBKDF;
|
||||
#endif
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user