提交 0485d066 编写于 作者: M Matthew Garrett 提交者: Mimi Zohar

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: NMatthew Garrett <mjg59@google.com>
Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
上级 f00d7975
...@@ -80,7 +80,7 @@ static struct shash_desc *init_desc(char type) ...@@ -80,7 +80,7 @@ static struct shash_desc *init_desc(char type)
if (type == EVM_XATTR_HMAC) { if (type == EVM_XATTR_HMAC) {
if (!(evm_initialized & EVM_INIT_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); return ERR_PTR(-ENOKEY);
} }
tfm = &hmac_tfm; tfm = &hmac_tfm;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册