mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: crypto: x86/poly1305 - Clear key material from stack in SSE2 variant
1-block SSE2 variant of poly1305 stores variables s1..s4 containing key
material on the stack. This commit adds missing zeroing of the stack
memory. Benchmarks show negligible performance hit (tested on i7-3770).
Signed-off-by: Tommi Hirvola <tommi@hirvola.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 7748168c66)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iada3921d6f93921385c4f1229973511c163d5aab
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2be733e152
commit
0227da548c
@@ -272,6 +272,10 @@ ENTRY(poly1305_block_sse2)
|
||||
dec %rcx
|
||||
jnz .Ldoblock
|
||||
|
||||
# Zeroing of key material
|
||||
mov %rcx,0x00(%rsp)
|
||||
mov %rcx,0x08(%rsp)
|
||||
|
||||
add $0x10,%rsp
|
||||
pop %r12
|
||||
pop %rbx
|
||||
|
||||
Reference in New Issue
Block a user