Re: [PATCH] crypto: cryptd - disable interrupts in cryptd_queue_worker to prevent data corruption

2012-10-20 Thread Jussi Kivilinna
Quoting David Miller : You should be disabling software interrupts, not hardware ones. Ok, I'll roll out v2. -Jussi -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.

Re: [PATCH 0/6] New test vectors for camellia, blowfish, serpent, aes, des and des3_ede

2012-10-20 Thread David Miller
From: Jussi Kivilinna Date: Sat, 20 Oct 2012 14:52:41 +0300 > Test vectors for camellia, blowfish and serpent are expanded for future > implementations. > > New test vectors for aes, des and des3_ede are added to test existing > implementations. > > --- > > Jussi Kivilinna (6): > crypto:

Re: [PATCH] crypto: cryptd - disable interrupts in cryptd_queue_worker to prevent data corruption

2012-10-20 Thread David Miller
You should be disabling software interrupts, not hardware ones. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 5/5] crypto: cast5/avx - avoid using temporary stack buffers

2012-10-20 Thread Jussi Kivilinna
Introduce new assembler functions to avoid use temporary stack buffers in glue code. This also allows use of vector instructions for xoring output in CTR and CBC modes and construction of IVs for CTR mode. ECB mode sees ~0.5% decrease in speed because added one extra function call. CBC mode decryp

[PATCH 4/5] crypto: serpent/avx - avoid using temporary stack buffers

2012-10-20 Thread Jussi Kivilinna
Introduce new assembler functions to avoid use temporary stack buffers in glue code. This also allows use of vector instructions for xoring output in CTR and CBC modes and construction of IVs for CTR mode. ECB mode sees ~0.5% decrease in speed because added one extra function call. CBC mode decryp

[PATCH 3/5] crypto: twofish/avx - avoid using temporary stack buffers

2012-10-20 Thread Jussi Kivilinna
Introduce new assembler functions to avoid use temporary stack buffers in glue code. This also allows use of vector instructions for xoring output in CTR and CBC modes and construction of IVs for CTR mode. ECB mode sees ~0.2% decrease in speed because added one extra function call. CBC mode decryp

[PATCH 2/5] crypto: cast6/avx - avoid using temporary stack buffers

2012-10-20 Thread Jussi Kivilinna
Introduce new assembler functions to avoid use temporary stack buffers in glue code. This also allows use of vector instructions for xoring output in CTR and CBC modes and construction of IVs for CTR mode. ECB mode sees ~0.5% decrease in speed because added one extra function call. CBC mode decryp

[PATCH 1/5] crypto: x86/glue_helper - use le128 instead of u128 for CTR mode

2012-10-20 Thread Jussi Kivilinna
'u128' currently used for CTR mode is on little-endian 'long long' swapped and would require extra swap operations by SSE/AVX code. Use of le128 instead of u128 allows IV calculations to be done with vector registers easier. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/camellia_glue.c

[PATCH 0/5] Avoid stack buffers in glue code of AVX implementations

2012-10-20 Thread Jussi Kivilinna
Patches modify AVX implementations so that they avoid using extra stack memory. Stack is not needed since implementation store blocks in registers. --- Jussi Kivilinna (5): crypto: x86/glue_helper - use le128 instead of u128 for CTR mode crypto: cast6/avx - avoid using temporary stack

[PATCH 6/6] crypto: testmgr - add new larger DES3_EDE testvectors

2012-10-20 Thread Jussi Kivilinna
Most DES3_EDE testvectors are short and do not test parallelised codepaths well. Add larger testvectors to test large crypto operations and to test multi-page crypto with DES3_EDE. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |1 crypto/testmgr.c | 15 + crypto/testmgr.h | 1106 +++

[PATCH 5/6] crypto: testmgr - add new larger DES testvectors

2012-10-20 Thread Jussi Kivilinna
Most DES testvectors are short and do not test parallelised codepaths well. Add larger testvectors to test large crypto operations and to test multi-page crypto with DES. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |1 crypto/testmgr.c | 15 + crypto/testmgr.h | 584 +

[PATCH 4/6] crypto: testmgr - add new larger AES testvectors

2012-10-20 Thread Jussi Kivilinna
Most AES testvectors are short and do not test parallelised codepaths well. Add larger testvectors to test large crypto operations and to test multi-page crypto with AES. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.h | 1112 ++ 1 file cha

[PATCH 3/6] crypto: testmgr - expand serpent test vectors

2012-10-20 Thread Jussi Kivilinna
AVX2 implementation of serpent cipher processes 16 blocks parallel, so we need to make test vectors larger to check parallel code paths. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.h | 780 +++--- 1 file changed, 742 insertions(+), 38 deleti

[PATCH 2/6] crypto: testmgr - expand blowfish test vectors

2012-10-20 Thread Jussi Kivilinna
AVX2 implementation of blowfish cipher processes 32 blocks parallel, so we need to make test vectors larger to check parallel code paths. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.h | 1000 -- 1 file changed, 962 insertions(+), 38 delet

[PATCH 1/6] crypto: testmgr - expand camellia test vectors

2012-10-20 Thread Jussi Kivilinna
AVX/AES-NI implementation of camellia cipher processes 16 blocks parallel, so we need to make test vectors larger to check parallel code paths. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.h | 990 +++--- 1 file changed, 940 insertions(+), 50

[PATCH 0/6] New test vectors for camellia, blowfish, serpent, aes, des and des3_ede

2012-10-20 Thread Jussi Kivilinna
Test vectors for camellia, blowfish and serpent are expanded for future implementations. New test vectors for aes, des and des3_ede are added to test existing implementations. --- Jussi Kivilinna (6): crypto: testmgr - expand camellia test vectors crypto: testmgr - expand blowfish te

[PATCH] crypto: cryptd - disable interrupts in cryptd_queue_worker to prevent data corruption

2012-10-20 Thread Jussi Kivilinna
cryptd_queue_worker attempts to prevent simultaneous accesses to crypto workqueue by cryptd_enqueue_request using preempt_disable/preempt_enable. However cryptd_enqueue_request might be called from interrupt context, so add local_irq_save/local_irq_restore to prevent data corruption and panics. Bu