summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJay Monkman <jay.monkman@freescale.com>2014-01-17 13:06:46 -0600
committerJason Liu <r64343@freescale.com>2014-01-19 14:53:56 +0800
commit48603cc64d20652b2a5ecf8e1e5ab19a82a47842 (patch)
tree354ecc21ef963e22f60f901c46169e88cb311c0b /arch
parentea578e2b5097f619a5a66aff26b7c422ffe30237 (diff)
ENGR00291086 crypto kernel module speed test in single fail
The tcrypt module is used to test the crypto API by being passed a mode=<value> during module load. The test runs to completion before insmod/modprobe returns. That makes the RCU stall detection in newer kernels unhappy. The simple fix is to add CONFIG_PREEMPT to the kernel config. That's what this patch does. If that introduces other problems, crypto/tcrypt.c can be modified to call schedule() in the correct places. Here's a patch that should work if this one has to be reverted: diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 66d254c..b771f7d 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -33,6 +33,7 @@ #include <linux/jiffies.h> #include <linux/timex.h> #include <linux/interrupt.h> +#include <linux/sched.h> #include "tcrypt.h" #include "internal.h" @@ -182,6 +183,7 @@ static void test_cipher_speed(const char *algo, int enc, unsigned int sec, goto out; } + schedule(); printk("test %u (%d bit key, %d byte blocks): ", i, *keysize * 8, *b_size); @@ -448,6 +450,7 @@ static void test_hash_speed(const char *algo, unsigned int sec, if (speed[i].klen) crypto_hash_setkey(tfm, tvmem[0], speed[i].klen); + schedule(); printk(KERN_INFO "test%3u " "(%5u byte blocks,%5u bytes per update,%4u updates): ", i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen); @@ -688,12 +691,12 @@ static void test_ahash_speed(const char *algo, unsigned int sec, break; } + schedule(); pr_info("test%3u " "(%5u byte blocks,%5u bytes per update,%4u updates): ", i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen); ahash_request_set_crypt(req, sg, output, speed[i].plen); - if (sec) ret = test_ahash_jiffies(req, speed[i].blen, speed[i].plen, output, sec); @@ -853,6 +856,7 @@ static void test_acipher_speed(const char *algo, int enc, unsigned int sec, goto out_free_req; } + schedule(); pr_info("test %u (%d bit key, %d byte blocks): ", i, *keysize * 8, *b_size); @@ -934,6 +938,7 @@ static void test_available(void) printk("alg %s ", *name); printk(crypto_has_alg(*name, 0, 0) ? "found\n" : "not found\n"); + schedule(); name++; } } Signed-off-by: Jay Monkman <jay.monkman@freescale.com> (cherry picked from commit 2dc1e6a900df2b575914a7c58fc08e4b072c0e67)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/imx_v7_defconfig20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index 8961330d2472..028d7c382c70 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -29,7 +29,7 @@ CONFIG_SOC_VF610=y
# CONFIG_SWP_EMULATE is not set
CONFIG_SMP=y
CONFIG_VMSPLIT_2G=y
-CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_PREEMPT=y
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
@@ -320,12 +320,30 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_FTRACE is not set
CONFIG_SECURITYFS=y
CONFIG_CRYPTO_USER=y
+CONFIG_CRYPTO_TEST=y
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_XTS=y
+CONFIG_CRYPTO_MD4=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_RMD128=y
+CONFIG_CRYPTO_RMD160=y
+CONFIG_CRYPTO_RMD256=y
+CONFIG_CRYPTO_RMD320=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_TGR192=y
+CONFIG_CRYPTO_WP512=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_CAMELLIA=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_TWOFISH=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y