Skip to contentSkip to conversation

crypto: aes-ni - Don't print message with KERN_ERR on old system

PATCH In review Roland Dreier 2 participants 2 messages Jun 23, 2009 – Jun 24, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: aes-ni - Don't print message with KERN_ERR on old system

When the aes-intel module is loaded on a system that does not have the AES instructions, it prints

Intel AES-NI instructions are not detected.

at level KERN_ERR. Since aes-intel is aliased to "aes" it will be tried whenever anything uses AES and spam the console. This doesn't match existing practice for how to handle "no hardware" when initializing a module, so downgrade the message to KERN_INFO.

---
 arch/x86/crypto/aesni-intel_glue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/crypto/aesni-intel_glue.c +1 -1
index c580c5e..d3ec8d5 100644
@@ -636,7 +636,7 @@ static int __init aesni_init(void)
 	int err;
 
 	if (!cpu_has_aes) {
-		printk(KERN_ERR "Intel AES-NI instructions are not detected.\n");
+		printk(KERN_INFO "Intel AES-NI instructions are not detected.\n");
 		return -ENODEV;
 	}
 	if ((err = crypto_register_alg(&aesni_alg)))
maintainer
#1 lore raw
Quoted 11 lines · Roland Dreier

When the aes-intel module is loaded on a system that does not have the AES instructions, it prints

Intel AES-NI instructions are not detected.

at level KERN_ERR. Since aes-intel is aliased to "aes" it will be tried whenever anything uses AES and spam the console. This doesn't match existing practice for how to handle "no hardware" when initializing a module, so downgrade the message to KERN_INFO.

Patch applied. Thanks Roland!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt