Commit 180b8dcc authored by Eli Cooper's avatar Eli Cooper Committed by Greg Kroah-Hartman

crypto: chacha20-ssse3 - Align stack pointer to 64 bytes

commit cbe09bd5 upstream.

This aligns the stack pointer in chacha20_4block_xor_ssse3 to 64 bytes.
Fixes general protection faults and potential kernel panics.
Signed-off-by: default avatarEli Cooper <elicooper@gmx.com>
Acked-by: default avatarMartin Willi <martin@strongswan.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a64021e8
...@@ -157,7 +157,9 @@ ENTRY(chacha20_4block_xor_ssse3) ...@@ -157,7 +157,9 @@ ENTRY(chacha20_4block_xor_ssse3)
# done with the slightly better performing SSSE3 byte shuffling, # done with the slightly better performing SSSE3 byte shuffling,
# 7/12-bit word rotation uses traditional shift+OR. # 7/12-bit word rotation uses traditional shift+OR.
sub $0x40,%rsp mov %rsp,%r11
sub $0x80,%rsp
and $~63,%rsp
# x0..15[0-3] = s0..3[0..3] # x0..15[0-3] = s0..3[0..3]
movq 0x00(%rdi),%xmm1 movq 0x00(%rdi),%xmm1
...@@ -620,6 +622,6 @@ ENTRY(chacha20_4block_xor_ssse3) ...@@ -620,6 +622,6 @@ ENTRY(chacha20_4block_xor_ssse3)
pxor %xmm1,%xmm15 pxor %xmm1,%xmm15
movdqu %xmm15,0xf0(%rsi) movdqu %xmm15,0xf0(%rsi)
add $0x40,%rsp mov %r11,%rsp
ret ret
ENDPROC(chacha20_4block_xor_ssse3) ENDPROC(chacha20_4block_xor_ssse3)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment