]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/s390/crypto/aes_s390.c
s390/crypto: simplify CPACF encryption / decryption functions
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 15 Aug 2016 13:17:52 +0000 (15:17 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Aug 2016 09:05:11 +0000 (11:05 +0200)
commit7bac4f5b8e3a607f7ba1d3a652f5922a657fa9e8
treea1c868629d1cb6c7ab563e0e5bb6c9c176f91fb9
parent69c0e360f990c2dc737681f40a361195066cef02
s390/crypto: simplify CPACF encryption / decryption functions

The double while loops of the CTR mode encryption / decryption functions
are overly complex for little gain. Simplify the functions to a single
while loop at the cost of an additional memcpy of a few bytes for every
4K page worth of data.
Adapt the other crypto functions to make them all look alike.

Reviewed-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/crypto/aes_s390.c
arch/s390/crypto/des_s390.c