linux_dsm_epyc7002/arch/x86/crypto/sha256-mb
Andrey Ryabinin 5dfeaac15f crypto: x86/sha256-mb - fix panic due to unaligned access
struct sha256_ctx_mgr allocated in sha256_mb_mod_init() via kzalloc()
and later passed in sha256_mb_flusher_mgr_flush_avx2() function where
instructions vmovdqa used to access the struct. vmovdqa requires
16-bytes aligned argument, but nothing guarantees that struct
sha256_ctx_mgr will have that alignment. Unaligned vmovdqa will
generate GP fault.

Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment
requirements.

Fixes: a377c6b187 ("crypto: sha256-mb - submit/flush routines for AVX2")
Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: <stable@vger.kernel.org>
Acked-by: Tim Chen
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-11-03 21:35:34 +08:00
..
Makefile objtool, x86: Add several functions and files to the objtool whitelist 2017-06-30 10:19:19 +02:00
sha256_mb_ctx.h crypto: sha-mb - Fix total_len for correct hash when larger than 512MB 2016-11-17 23:35:00 +08:00
sha256_mb_mgr_datastruct.S crypto: sha256-mb - Algorithm data structures 2016-06-27 16:57:45 +08:00
sha256_mb_mgr_flush_avx2.S crypto: x86/sha256-mb - fix panic due to unaligned access 2017-11-03 21:35:34 +08:00
sha256_mb_mgr_init_avx2.c crypto: sha256-mb - submit/flush routines for AVX2 2016-06-27 16:57:44 +08:00
sha256_mb_mgr_submit_avx2.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha256_mb_mgr.h crypto: sha256-mb - Algorithm data structures 2016-06-27 16:57:45 +08:00
sha256_mb.c crypto: sha-mb - Fix total_len for correct hash when larger than 512MB 2016-11-17 23:35:00 +08:00
sha256_x8_avx2.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00