diff mbox series

[1/2] libstb: increase the log level of verify/measure messages to PR_NOTICE.

Message ID 1518028274-8454-1-git-send-email-ppaidipe@linux.vnet.ibm.com
State Accepted
Headers show
Series [1/2] libstb: increase the log level of verify/measure messages to PR_NOTICE. | expand

Commit Message

ppaidipe Feb. 7, 2018, 6:31 p.m. UTC
Currently libstb logs the verify and hash caluculation messages in
PR_INFO level. So when there is a secure boot enforcement happens
in loading last flash resource(Ex: BOOTKERNEL), the previous verify
and measure messages are not logged to console, which is not clear
to the end user which resource is verified and measured.
So this patch fixes this by increasing the log level to PR_NOTICE.

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
---
 libstb/secureboot.c  | 2 +-
 libstb/trustedboot.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Stewart Smith Feb. 9, 2018, 5:02 a.m. UTC | #1
Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> writes:
> Currently libstb logs the verify and hash caluculation messages in
> PR_INFO level. So when there is a secure boot enforcement happens
> in loading last flash resource(Ex: BOOTKERNEL), the previous verify
> and measure messages are not logged to console, which is not clear
> to the end user which resource is verified and measured.
> So this patch fixes this by increasing the log level to PR_NOTICE.
>
> Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>

thanks, series merged to master as of 7912f9750bfcb77d463d4854328c6a470516d8b0
diff mbox series

Patch

diff --git a/libstb/secureboot.c b/libstb/secureboot.c
index afe19fe..08a6ae6 100644
--- a/libstb/secureboot.c
+++ b/libstb/secureboot.c
@@ -179,7 +179,7 @@  int secureboot_verify(enum resource_id id, void *buf, size_t len)
 	rc = call_cvc_verify(buf, len, hw_key_hash, hw_key_hash_size, &log);
 
 	if (rc == OPAL_SUCCESS) {
-		prlog(PR_INFO, "%s verified\n", name);
+		prlog(PR_NOTICE, "%s verified\n", name);
 	} else if (rc == OPAL_PARTIAL) {
 		/*
 		 * The value returned in log indicates what checking has
diff --git a/libstb/trustedboot.c b/libstb/trustedboot.c
index e2df0e6..058e45e 100644
--- a/libstb/trustedboot.c
+++ b/libstb/trustedboot.c
@@ -215,7 +215,7 @@  int trustedboot_measure(enum resource_id id, void *buf, size_t len)
 	rc = call_cvc_sha512(buf_aux, len_aux, digest, SHA512_DIGEST_LENGTH);
 
 	if (rc == OPAL_SUCCESS) {
-		prlog(PR_INFO, "%s hash calculated\n", name);
+		prlog(PR_NOTICE, "%s hash calculated\n", name);
 	} else if (rc == OPAL_PARAMETER) {
 		prlog(PR_ERR, "%s NOT MEASURED, invalid param. buf=%p, "
 		      "len=%zd, digest=%p\n", name, buf_aux,