aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/crypto
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-05-21 10:09:41 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-05-28 01:46:47 -0400
commitde614e561b9c633073caae8f86399aa8923ef85d (patch)
treea95cbac49c0cf81bb59c2f3346b6c5bca4ecefb8 /arch/x86/crypto
parent286233e604d79f0c7fa04abec2180d5d89a74749 (diff)
crypto: sha256_ssse3 - fix stack corruption with SSSE3 and AVX implementations
The _XFER stack element size was set too small, 8 bytes, when it needs to be 16 bytes. As _XFER is the last stack element used by these implementations, the 16 byte stores with 'movdqa' corrupt the stack where the value of register %r12 is temporarily stored. As these implementations align the stack pointer to 16 bytes, this corruption did not happen every time. Patch corrects this issue. Reported-by: Julian Wollrath <jwollrath@web.de> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> Tested-by: Julian Wollrath <jwollrath@web.de> Acked-by: Tim Chen <tim.c.chen@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto')
-rw-r--r--arch/x86/crypto/sha256-avx-asm.S2
-rw-r--r--arch/x86/crypto/sha256-ssse3-asm.S2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/crypto/sha256-avx-asm.S b/arch/x86/crypto/sha256-avx-asm.S
index 56610c4bf31b..642f15687a0a 100644
--- a/arch/x86/crypto/sha256-avx-asm.S
+++ b/arch/x86/crypto/sha256-avx-asm.S
@@ -118,7 +118,7 @@ y2 = %r15d
118 118
119_INP_END_SIZE = 8 119_INP_END_SIZE = 8
120_INP_SIZE = 8 120_INP_SIZE = 8
121_XFER_SIZE = 8 121_XFER_SIZE = 16
122_XMM_SAVE_SIZE = 0 122_XMM_SAVE_SIZE = 0
123 123
124_INP_END = 0 124_INP_END = 0
diff --git a/arch/x86/crypto/sha256-ssse3-asm.S b/arch/x86/crypto/sha256-ssse3-asm.S
index 98d3c391da81..f833b74d902b 100644
--- a/arch/x86/crypto/sha256-ssse3-asm.S
+++ b/arch/x86/crypto/sha256-ssse3-asm.S
@@ -111,7 +111,7 @@ y2 = %r15d
111 111
112_INP_END_SIZE = 8 112_INP_END_SIZE = 8
113_INP_SIZE = 8 113_INP_SIZE = 8
114_XFER_SIZE = 8 114_XFER_SIZE = 16
115_XMM_SAVE_SIZE = 0 115_XMM_SAVE_SIZE = 0
116 116
117_INP_END = 0 117_INP_END = 0