]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: x86/sha512_ssse3 - fixup for asm function prototype change
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 24 Apr 2015 06:37:09 +0000 (08:37 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 24 Apr 2015 12:09:01 +0000 (20:09 +0800)
commit7090ce1ba73c7a09edcc8d769990ba11d904bafa
tree80589d0267e418abe1ba3100536d0bfe39d3feb4
parent19cba4a19c666b12a80ce2e6cdc1a9f215156f61
crypto: x86/sha512_ssse3 - fixup for asm function prototype change

Patch 0b91ce719c12 ("crypto: x86/sha512_ssse3 - move SHA-384/512
SSSE3 implementation to base layer") changed the prototypes of the
core asm SHA-512 implementations so that they are compatible with
the prototype used by the base layer.

However, in one instance, the register that was used for passing the
input buffer was reused as a scratch register later on in the code,
and since the input buffer param changed places with the digest param
-which needs to be written back before the function returns- this
resulted in the scratch register to be dereferenced in a memory write
operation, causing a GPF.

Fix this by changing the scratch register to use the same register as
the input buffer param again.

Fixes: 0b91ce719c12 ("crypto: x86/sha512_ssse3 - move SHA-384/512 SSSE3 implementation to base layer")
Reported-By: Bobby Powers <bobbypowers@gmail.com>
Tested-By: Bobby Powers <bobbypowers@gmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha512-avx2-asm.S