]> git.itanic.dy.fi Git - linux-stable/commit
crypto: s390 - fix concurrency issue in aes-ctr mode
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Thu, 16 Jan 2014 15:01:11 +0000 (16:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Feb 2014 19:06:10 +0000 (11:06 -0800)
commit5b64d8f705a69fd3a3b2859aaf253a7127150599
tree7b3907021f2156ad290eaa359f8cf86d6481f8d6
parenta082f872743e09fe2cdf870b2d8f1b5dccd36cf7
crypto: s390 - fix concurrency issue in aes-ctr mode

commit 0519e9ad89e5cd6e6b08398f57c6a71d9580564c upstream.

The aes-ctr mode uses one preallocated page without any concurrency
protection. When multiple threads run aes-ctr encryption or decryption
this can lead to data corruption.

The patch introduces locking for the page and a fallback solution with
slower en/decryption performance in concurrency situations.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/crypto/aes_s390.c