• D
    crypto: aesni - Use unaligned loads from gcm_context_data · e5b954e8
    Dave Watson 提交于
    A regression was reported bisecting to 1476db2d
    "Move HashKey computation from stack to gcm_context".  That diff
    moved HashKey computation from the stack, which was explicitly aligned
    in the asm, to a struct provided from the C code, depending on
    AESNI_ALIGN_ATTR for alignment.   It appears some compilers may not
    align this struct correctly, resulting in a crash on the movdqa
    instruction when attempting to encrypt or decrypt data.
    
    Fix by using unaligned loads for the HashKeys.  On modern
    hardware there is no perf difference between the unaligned and
    aligned loads.  All other accesses to gcm_context_data already use
    unaligned loads.
    Reported-by: NMauro Rossi <issor.oruam@gmail.com>
    Fixes: 1476db2d ("Move HashKey computation from stack to gcm_context")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: NDave Watson <davejwatson@fb.com>
    Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
    e5b954e8
aesni-intel_asm.S 76.6 KB