[PATCH] crypto: s390 - fix des and des3_ede cbc concurrency issue

2014-01-22 Thread Harald Freudenberger
In s390 des and des3_ede cbc mode the iv value is not protected against concurrency access and modifications from another running en/decrypt operation which is using the very same tfm struct instance. This fix copies the iv to the local stack before the crypto operation and stores the value back

[PATCH] crypto: s390 - fix des and des3_ede ctr concurrency issue

2014-01-22 Thread Harald Freudenberger
In s390 des and 3des ctr mode there is one preallocated page used to speed up the en/decryption. This page is not protected against concurrent usage and thus there is a potential of data corruption with multiple threads. The fix introduces locking/unlocking the ctr page and a slower fallback