]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
EVM: Only complain about a missing HMAC key once
authorMatthew Garrett <mjg59@google.com>
Wed, 11 Oct 2017 19:11:12 +0000 (12:11 -0700)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 8 Nov 2017 20:16:36 +0000 (15:16 -0500)
A system can validate EVM digital signatures without requiring an HMAC
key, but every EVM validation will generate a kernel error. Change this
so we only generate an error once.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/evm/evm_crypto.c

index 1d32cd20009a3bd35cf77bc11027354c00eb8812..bcd64baf87881b4194cf9852c0167900d96ddddc 100644 (file)
@@ -80,7 +80,7 @@ static struct shash_desc *init_desc(char type)
 
        if (type == EVM_XATTR_HMAC) {
                if (!(evm_initialized & EVM_INIT_HMAC)) {
-                       pr_err("HMAC key is not set\n");
+                       pr_err_once("HMAC key is not set\n");
                        return ERR_PTR(-ENOKEY);
                }
                tfm = &hmac_tfm;