From 083cdb931083c33ed2fa3ca865f0cf9524b49f70 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 15 Oct 2021 19:17:45 +0200 Subject: [PATCH] Add a debug message before running keyslot PBKDF. This is useful for debugging if the process is killed by OOM. --- lib/luks2/luks2_keyslot_luks2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/luks2/luks2_keyslot_luks2.c b/lib/luks2/luks2_keyslot_luks2.c index ea581120..6d759e5a 100644 --- a/lib/luks2/luks2_keyslot_luks2.c +++ b/lib/luks2/luks2_keyslot_luks2.c @@ -248,6 +248,7 @@ static int luks2_keyslot_set_key(struct crypt_device *cd, /* * Calculate keyslot content, split and store it to keyslot area. */ + log_dbg(cd, "Running keyslot key derivation."); r = crypt_pbkdf(pbkdf.type, pbkdf.hash, password, passwordLen, salt, LUKS_SALTSIZE, derived_key->key, derived_key->keylength, @@ -350,6 +351,7 @@ static int luks2_keyslot_get_key(struct crypt_device *cd, /* * Calculate derived key, decrypt keyslot content and merge it. */ + log_dbg(cd, "Running keyslot key derivation."); r = crypt_pbkdf(pbkdf.type, pbkdf.hash, password, passwordLen, salt, LUKS_SALTSIZE, derived_key->key, derived_key->keylength,