瀏覽代碼

EVM: Only complain about a missing HMAC key once

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>
Matthew Garrett 7 年之前
父節點
當前提交
0485d066d8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      security/integrity/evm/evm_crypto.c

+ 1 - 1
security/integrity/evm/evm_crypto.c

@@ -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;