aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-11-24 11:47:19 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2020-12-04 18:13:13 +1100
commit17858b140bf49961b71d4e73f1c3ea9bc8e7dda0 (patch)
tree89b0f162292703ef55bf19475fc3156da73b96f8 /include
parentcrypto: ccree - rework cache parameters handling (diff)
downloadlinux-dev-17858b140bf49961b71d4e73f1c3ea9bc8e7dda0.tar.xz
linux-dev-17858b140bf49961b71d4e73f1c3ea9bc8e7dda0.zip
crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()
ecdh_set_secret() casts a void* pointer to a const u64* in order to feed it into ecc_is_key_valid(). This is not generally permitted by the C standard, and leads to actual misalignment faults on ARMv6 cores. In some cases, these are fixed up in software, but this still leads to performance hits that are entirely avoidable. So let's copy the key into the ctx buffer first, which we will do anyway in the common case, and which guarantees correct alignment. Cc: <stable@vger.kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions