summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2014-03-24 16:10:38 (GMT)
committerHerbert Xu <herbert@gondor.apana.org.au>2014-03-25 12:25:43 (GMT)
commit6c8c17cc7a8806dde074d7c0bf4d519dd4d028c5 (patch)
treed391a0579378dbdd4de40f441bb94d0e579811ff /arch/x86/kernel/e820.c
parent6ca5afb8c26991cf4f13a8bcca870ec2a9522bf7 (diff)
downloadlinux-6c8c17cc7a8806dde074d7c0bf4d519dd4d028c5.tar.xz
crypto: x86/sha1 - fix stack alignment of AVX2 variant
The AVX2 implementation might waste up to a page of stack memory because of a wrong alignment calculation. This will, in the worst case, increase the stack usage of sha1_transform_avx2() alone to 5.4 kB -- way to big for a kernel function. Even worse, it might also allocate *less* bytes than needed if the stack pointer is already aligned bacause in that case the 'sub %rbx, %rsp' is effectively moving the stack pointer upwards, not downwards. Fix those issues by changing and simplifying the alignment calculation to use a 32 byte alignment, the alignment really needed. Cc: Chandramouli Narayanan <mouli@linux.intel.com> Signed-off-by: Mathias Krause <minipli@googlemail.com> Reviewed-by: H. Peter Anvin <hpa@linux.intel.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/kernel/e820.c')
0 files changed, 0 insertions, 0 deletions