From c799c6644b52ea5b55136fdc97a2644f232056a8 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 2 Jul 2021 16:25:20 -0700 Subject: [PATCH] ANDROID: fips140: adjust some log messages Downgrade some expected log messages from pr_warn() to pr_info(). Also remove "FIPS 140" from some log messages since the messages are already prefixed with "fips140: " (the name of the module) which makes it redundant. Bug: 153614920 Bug: 188620248 Change-Id: I94055d7a5a86a770fcf38e958e7d7497b4bafdf0 Signed-off-by: Eric Biggers --- crypto/fips140-module.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/fips140-module.c b/crypto/fips140-module.c index 7971e0bdfb36..3738ec94d2ce 100644 --- a/crypto/fips140-module.c +++ b/crypto/fips140-module.c @@ -250,8 +250,8 @@ static bool __init check_fips140_module_hmac(void) textsize = &__fips140_text_end - &__fips140_text_start; rodatasize = &__fips140_rodata_end - &__fips140_rodata_start; - pr_warn("text size : 0x%x\n", textsize); - pr_warn("rodata size: 0x%x\n", rodatasize); + pr_info("text size : 0x%x\n", textsize); + pr_info("rodata size: 0x%x\n", rodatasize); textcopy = kmalloc(textsize + rodatasize, GFP_KERNEL); if (!textcopy) { @@ -283,7 +283,7 @@ static bool __init check_fips140_module_hmac(void) return false; } - pr_warn("using '%s' for integrity check\n", + pr_info("using '%s' for integrity check\n", crypto_shash_driver_name(desc->tfm)); err = crypto_shash_setkey(desc->tfm, fips140_integ_hmac_key, @@ -528,7 +528,7 @@ fips140_init(void) { const u32 *initcall; - pr_info("Loading FIPS 140 module\n"); + pr_info("loading module\n"); unregister_existing_fips140_algos(); @@ -564,12 +564,12 @@ fips140_init(void) */ if (!check_fips140_module_hmac()) { - pr_crit("FIPS 140 integrity check failed -- giving up!\n"); + pr_crit("integrity check failed -- giving up!\n"); goto panic; } + pr_info("integrity check passed\n"); - pr_info("FIPS 140 integrity check successful\n"); - pr_info("FIPS 140 module successfully loaded\n"); + pr_info("module successfully loaded\n"); return 0; panic: