[patch 08/15] kmsg: convert cpacf printk messages to kmsg api.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>

Signed-off-by: Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>
---

 Documentation/s390/kmsg/aes_s390 |   32 ++++++++++++++++++++++++++++++++
 arch/s390/crypto/aes_s390.c      |   14 +++++++++-----
 2 files changed, 41 insertions(+), 5 deletions(-)

Index: quilt-2.6/arch/s390/crypto/aes_s390.c
===================================================================
--- quilt-2.6.orig/arch/s390/crypto/aes_s390.c
+++ quilt-2.6/arch/s390/crypto/aes_s390.c
@@ -22,8 +22,11 @@
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <asm/kmsg.h>
 #include "crypt_s390.h"
 
+#define KMSG_COMPONENT "aes_s390"
+
 #define AES_KEYLEN_128		1
 #define AES_KEYLEN_192		2
 #define AES_KEYLEN_256		4
@@ -169,7 +172,8 @@ static int fallback_init_cip(struct cryp
 			CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
 
 	if (IS_ERR(sctx->fallback.cip)) {
-		printk(KERN_ERR "Error allocating fallback algo %s\n", name);
+		kmsg_err(1, "Allocating AES fallback algorithm %s failed\n",
+			 name);
 		return PTR_ERR(sctx->fallback.blk);
 	}
 
@@ -349,7 +353,8 @@ static int fallback_init_blk(struct cryp
 			CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
 
 	if (IS_ERR(sctx->fallback.blk)) {
-		printk(KERN_ERR "Error allocating fallback algo %s\n", name);
+		kmsg_err(1, "Allocating AES fallback algorithm %s failed\n",
+			 name);
 		return PTR_ERR(sctx->fallback.blk);
 	}
 
@@ -515,9 +520,8 @@ static int __init aes_s390_init(void)
 
 	/* z9 109 and z9 BC/EC only support 128 bit key length */
 	if (keylen_flag == AES_KEYLEN_128)
-		printk(KERN_INFO
-		       "aes_s390: hardware acceleration only available for "
-		       "128 bit keys\n");
+		kmsg_info(2, "AES hardware acceleration is only available for"
+			  " 128-bit keys\n");
 
 	ret = crypto_register_alg(&aes_alg);
 	if (ret)
Index: quilt-2.6/Documentation/s390/kmsg/aes_s390
===================================================================
--- /dev/null
+++ quilt-2.6/Documentation/s390/kmsg/aes_s390
@@ -0,0 +1,32 @@
+/*?
+ * Tag: aes_s390.1
+ * Text: "Allocating AES fallback algorithm %s failed"
+ * Severity: Error
+ * Parameter:
+ *   @1: algorithm name
+ * Description:
+ * The advanced encryption standard (AES) algorithm includes three modes with
+ * 128-bit, 192-bit, and 256-bit keys. Your hardware system only provides
+ * hardware acceleration for the 128-bit mode. The aes_s390 module failed to
+ * allocate a software fallback for the AES modes that are not supported by the
+ * hardware. A possible reason for this problem is that the aes_generic module
+ * that provides the fallback algorithms is not available.
+ * User action:
+ * Use the 128-bit mode only or ensure that the aes_generic module is available
+ * and loaded and reload the aes_s390 module.
+ */
+
+/*?
+ * Tag: aes_s390.2
+ * Text: "AES hardware acceleration is only available for 128-bit keys"
+ * Severity: Informational
+ * Description:
+ * The advanced encryption standard (AES) algorithm includes three modes with
+ * 128-bit, 192-bit, and 256-bit keys. Your hardware system only provides
+ * hardware acceleration for the 128-bit key mode. The aes_s390 module
+ * will use the less performant software fallback algorithm for the 192-bit
+ * and 256-bit key modes.
+ * User action:
+ * None.
+ */
+

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux