Skip to content

Commit 00425bb

Browse files
Ard Biesheuvelherbertx
authored andcommitted
crypto: x86/sha512_ssse3 - fixup for asm function prototype change
Patch e68410e ("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: e68410e ("crypto: x86/sha512_ssse3 - move SHA-384/512 SSSE3 implementation to base layer") Reported-By: Bobby Powers <[email protected]> Tested-By: Bobby Powers <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 34c9a0f commit 00425bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/crypto/sha512-avx2-asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ NUM_BLKS = %rdx
7979
c = %rcx
8080
d = %r8
8181
e = %rdx
82-
y3 = %rdi
82+
y3 = %rsi
8383

8484
TBL = %rbp
8585

0 commit comments

Comments
 (0)