aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Child <nnac123@gmail.com>2021-04-14 19:40:33 -0400
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-06-24 17:02:08 +0530
commite35b9fac10532dda79a8d96d32c4eeff8b718b48 (patch)
tree6fc420aa11dcfadc68fda74e983d5796409ca174
parent2d593ddd7f1221010e1459765e7b17807d2b0896 (diff)
downloadskiboot-e35b9fac10532dda79a8d96d32c4eeff8b718b48.zip
skiboot-e35b9fac10532dda79a8d96d32c4eeff8b718b48.tar.gz
skiboot-e35b9fac10532dda79a8d96d32c4eeff8b718b48.tar.bz2
edk2-compat-process.c: Remove repetitive debug print statements
[ Upstream commit ec884c19bfff75bc5b59093113f170837be28ec9 ] Functions `get_esl_cert`, `validate_esl_list` and `get_esl_signature_list_size` all contain the same debug print statement. This statement prints the size of the ESL. `validate_esl_list` calls `get_esl_cert` so the same debug information prints twice when validating the newly submitted ESL. Additionally, the same debug prints twice when validating the current ESL since `get_esl_cert` and `get_esl_signature_list_size` are both called by the function `verify_signature`. Since `get_esl_cert` is the common factor, this commit removes the other two print statements (and adds some information to an error message to maintain clarity, in case `validate_esl_list` fails before calling `validate_esl_cert`). After double checking that these functions are not being called anywhere else, the only real change is to reduce the number of redundant print statements for the secvar update process. Signed-off-by: Nick Child <nick.child@ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r--libstb/secvar/backend/edk2-compat-process.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libstb/secvar/backend/edk2-compat-process.c b/libstb/secvar/backend/edk2-compat-process.c
index dfaec13..244f234 100644
--- a/libstb/secvar/backend/edk2-compat-process.c
+++ b/libstb/secvar/backend/edk2-compat-process.c
@@ -105,9 +105,6 @@ static int32_t get_esl_signature_list_size(const char *buf, const size_t buflen)
if (!list)
return OPAL_PARAMETER;
- prlog(PR_DEBUG, "size of signature list size is %u\n",
- le32_to_cpu(list->SignatureListSize));
-
return le32_to_cpu(list->SignatureListSize);
}
@@ -275,15 +272,13 @@ int validate_esl_list(const char *key, const char *esl, const size_t size)
if (!list)
return OPAL_PARAMETER;
- prlog(PR_DEBUG, "size of signature list size is %u\n",
- le32_to_cpu(list->SignatureListSize));
-
/* Calculate the size of the ESL */
eslsize = le32_to_cpu(list->SignatureListSize);
/* If could not extract the size */
if (eslsize <= 0) {
- prlog(PR_ERR, "Invalid size of the ESL\n");
+ prlog(PR_ERR, "Invalid size of the ESL: %u\n",
+ le32_to_cpu(list->SignatureListSize));
rc = OPAL_PARAMETER;
break;
}