From: Tushar Sugandhi <tusharsu@linux.microsoft.com>
To: zohar@linux.ibm.com, joe@perches.com, skhan@linuxfoundation.org,
linux-integrity@vger.kernel.org
Cc: sashal@kernel.org, nramas@linux.microsoft.com,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] IMA: Add log statements for failure conditions.
Date: Mon, 10 Feb 2020 18:47:54 -0800 [thread overview]
Message-ID: <20200211024755.5579-2-tusharsu@linux.microsoft.com> (raw)
In-Reply-To: <20200211024755.5579-1-tusharsu@linux.microsoft.com>
process_buffer_measurement() and ima_alloc_key_entry()
functions do not have log messages for failure conditions.
This change adds log statements in the above functions.
Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
---
security/integrity/ima/ima_main.c | 3 +++
security/integrity/ima/ima_queue_keys.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 9fe949c6a530..ee01ee34eec8 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -757,6 +757,9 @@ void process_buffer_measurement(const void *buf, int size,
ima_free_template_entry(entry);
out:
+ if (ret < 0)
+ pr_err("Process buffer measurement failed, result: %d\n", ret);
+
return;
}
diff --git a/security/integrity/ima/ima_queue_keys.c b/security/integrity/ima/ima_queue_keys.c
index c87c72299191..6a9ee52649c4 100644
--- a/security/integrity/ima/ima_queue_keys.c
+++ b/security/integrity/ima/ima_queue_keys.c
@@ -90,6 +90,7 @@ static struct ima_key_entry *ima_alloc_key_entry(struct key *keyring,
out:
if (rc) {
+ pr_err("Key entry allocation failed, result: %d\n", rc);
ima_free_key_entry(entry);
entry = NULL;
}
--
2.17.1
next prev parent reply other threads:[~2020-02-11 2:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 2:47 [PATCH v2 1/3] IMA: Update KBUILD_MODNAME for IMA files to ima Tushar Sugandhi
2020-02-11 2:47 ` Tushar Sugandhi [this message]
2020-02-11 3:23 ` [PATCH v2 2/3] IMA: Add log statements for failure conditions Joe Perches
2020-02-11 19:14 ` Tushar Sugandhi
2020-02-11 20:09 ` Joe Perches
2020-02-11 2:47 ` [PATCH v2 3/3] IMA: Add module name and base name prefix to log Tushar Sugandhi
2020-02-11 3:09 ` [PATCH v2 1/3] IMA: Update KBUILD_MODNAME for IMA files to ima Joe Perches
2020-02-11 17:36 ` Lakshmi Ramasubramanian
2020-02-11 17:55 ` Tushar Sugandhi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200211024755.5579-2-tusharsu@linux.microsoft.com \
--to=tusharsu@linux.microsoft.com \
--cc=joe@perches.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nramas@linux.microsoft.com \
--cc=sashal@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.